|
If you put a bit of relevant code, people will be able to help better.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
in the header file which defines your class, put the fillowing aroung your file content :
#if !defined(__A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__)
#define __A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__
#endif //__A_UNIQUE_MACRO_NAME_FOR_YOUR_FILE__
|
|
|
|
|
Don't forget to put include guards in your header files:
#ifndef MYFILE_H<br />
#define MYFILE_H<br />
<br />
<br />
#endif
Or you can also use the #pragma directive.
|
|
|
|
|
use #pragma once
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
suganforu wrote: ...eventhougyh i havent definied it anywhere before in pgm.
Obviously you have, or the compiler would not be complaining. Use the #define and #pragma once directives in your class definition file.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can anyone suggest any book for working VC++ with Flash 8
Thanks in advance
sai
|
|
|
|
|
Hi,
A client ask to me a program to work on a simple database.
It looks quite easy for me, but not everything!
He asked to me something that I haven't do before, so before accept the job I want to understand how complex is this, and, after that, of course, I'll have to study it:
1 Store the DB on a server(or simply on a pc more important than the other), every other client-pc asks to this server (local network) some info before send to it a new valid item of the DB. of course somethimes the client have to ask to the server the complete DB to draw it.
2 Prepare a Microsoft-Word document filling somewhere the page using some info from an item of the DB. Is it a possible solution use the word-macros? Any sample?
I haven't any idea on how solve this two features. Is it an hard task?
Have you got some keywords/article/sample to look at?
If needed I can explain more in deeper this features.
Thank you very much for every help
Russell
|
|
|
|
|
How to remove a directory and it's sub directory/files? Api RemoveDirectory only operates on empty directories.
|
|
|
|
|
You need to write a recursive function to walk down the folder tree and start deleting things from the bottom up.
For a given directory enumerate the contents, for each sub directory call your directory delete function again and then delete the directory when it returns
|
|
|
|
|
You could try experimenting with SHFileOperation() setting the wFunc member to FO_DELETE and NOT including FOF_NORECURSION in the fFlags member. I have used it to delete all files in a folder in one operation but havent actually tried the recursive delete that is implied by the FOF_NORECURSION flag.
|
|
|
|
|
|
Please Note: _rmdir The directory must be empty, and it must not be the current working directory or the root directory.
|
|
|
|
|
http://www.codeproject.com/shell/cshellfileop.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello to all,
in my project i am uploading the files on a server,now i want one pop up dialog box having message "Starting Uploading Process" which will appear when i will click on button "Upload" and then that dialog box should get vanished automatically after 2-3 seconds and then actual uploading process should get started means that dialog box should not have "Ok/Cancel" buttons, it should get vanished automatically after 2-3 seconds rather than get vanished after clicking on "Ok" or "cancel" button, how this can be done? can anybody help me plz?
Thanks & Regards,
Anay
|
|
|
|
|
Sounds like you'll need a dialog box and a timer. Are you using MFC?
|
|
|
|
|
yes josh i am using MFC, can u tell me how it can be done?
Anay
|
|
|
|
|
AnayKulkarni wrote: can u tell me how it can be done?
Not off the top of my head. You'll need a dialog that starts a timer when its created and closes itself when the timer fires. I'm sure you can find all that in google or even here in various articles
|
|
|
|
|
You can use of CDialog and set Timer for it with SetTimer .
|
|
|
|
|
simple,
do like this.
1.in your upload button,before your actual code, create a thread.
2.in that thread, show up your dialog containing "starting uploading process".
3.in your dialog, start onemore thread in initdialog.
4.in that thread, wait for 2 or 3 seconds and exit your new dialog.
thats it.
the above suggestions are only to give you a clue.
you have to apply some intelligence there to achieve this.
any more guidance required?,
you are welcome.
gud luck.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
I am curious as to why you would go to the trouble of starting threads when all it needs is to call SetTimer in OnInitDialog and have a WM_TIMER handler that calls KillTimer and EndDialog when the timer event fires.
|
|
|
|
|
hai broom, may be you are right.
but i want to know weather timer is different in performance to the thread.
AFAIK timer is also a sort of a thread.
in the example which i have given, he can even customise his second thread, such that, it kills the dialog, after uploading is completed.
iam not sure weather it can be achieved through timer.
thanks.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
chandu004 wrote: but i want to know weather timer is different in performance to the thread.
AFAIK timer is also a sort of a thread.
Timer performance is the same regardless of whether it is called from the primary thread or a secondary thread. A timer is NOT a thread-type object - it has no executable context. It is an object that is queued by the OS and released / signalled by the OS when the period has expired.
chandu004 wrote: in the example which i have given, he can even customise his second thread, such that, it kills the dialog, after uploading is completed.
If a simple modeless dialog is used by the main thread to indicate download in progress, the main program can then destroy the box when download is complete. This is how most progress dialogs are implemented.
Judy
|
|
|
|
|
chandu004 wrote: in the example which i have given...
Which is complete overkill, given that two additional threads were suggested. Using SetTimer() is the simplest and most practical solution.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Hi,
I need to programmatically set system folder permissions by using Active Directory Service Interfaces.For this I need ADsSecurity.dll file installed.These files are included with the software development kit (SDK) for Active Directory Service Interfaces 2.5.
Iam Unable to find the relevant link to download the dll.
Can anyone provide me the link to download?
Thanks
-- modified at 2:11 Monday 15th October, 2007
Today is a gift, that's why it is called the present.
|
|
|
|