|
Use this function
BOOL GetExitCodeThread(
HANDLE hThread, // handle to the thread
LPDWORD lpExitCode // termination status
);
if ( lpExitCode == STILL_ACTIVE )
// The thread is running
else
// The trhad has finished and lpExitCode contains the return code
|
|
|
|
|
Use something like this
BOOL HasAlreadyQuit(CWinThread* pThread)
{
return ::WaitForSingleObject(pThread->m_hThread,0)==WAIT_OBJECT_0;
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks!
|
|
|
|
|
Hello,
What is stack overflow? When I debug a program with iterative function. It said "Unhandled exception in Go.exe, 0xC00000FD: Stack Overflow". Who can tell me the reason. Did that mean my program ask for too many system resource?
Kidd
|
|
|
|
|
Each time you call a function, some information (namely the parameters passed, the address of the return point, etc.) is stored on a memory area called the stack, whose name stems from the fact that it behaves like a stockpile of items, i.e. it is fed up and emptied from the top. The stack grows as the program goes deeper into functions calling other functions and shortens as these functions return. Now consider this function for computing the factorial of a number:
int factorial(int x)
{
if(x==0)return 1;
else return x*factorial(x-1);
} factorial() works fine as long as you call it with a positive argument, but what happens if you invoke factorial(-1) ? The function calls itself again and again with arguments more and more negative, until the memory space reserved by the system for the stack fills up and the exception you report pops up.
What most probably happened to you is some kind of neverending recursive loop like this, though possibly in a more convoluted fashion.
Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi
I want to remove echo sound when record wave file form sound card....
|
|
|
|
|
Hi !!
i want to hook the File Directory system of my machine so that any File changes (like create,modify, rename etc) can be detected.
i am using FindFirstChangeNotificcation('Root Dir:\') to get the handles of all subdirectories inside the root. then using WaitForMultipleObjects() i wait for a change notification.
but this approach is not working fine. could someone suggest me a better approach. i can give further details.
PLZ HELP !!
|
|
|
|
|
You are using the right method. I don't know what's your problem with this, but look at this for more info.
MSDN article
Monitoring Changes in a Directory or Directory Tree
Platform SDK: Files and I/O
|
|
|
|
|
I need a list that can display files and folders of hard disk, and also support drag and drop,
|
|
|
|
|
Create two views View1 and View2 and then attach CTreeCtrl with view1 and CListView with view2.The member function of these classes are so much rich that all of explorer functionality could be implemented.....
and at the end "Thanks The MFC Classes".;P
|
|
|
|
|
Hi
I am writting an application to monitor the hardware device. My application is a DLL and I want it to send event notification to the mail application when something happens.
Anyone has any idea how to do that event notifications ?
Thanks in advance
Quang
|
|
|
|
|
What kind of event notifications? What kind of mail application?
Michael
|
|
|
|
|
Hi guys,
i want to make a bar chart schema,and i would like to ask U,if there is any way to make it with activex ,and how!
Thank u in advance!
|
|
|
|
|
I'd recommend you look at ATL/WTL. With these you can make any activex you want.
Michael
|
|
|
|
|
Hi guys,
i want to make a bar chart schema,and i would like to ask U,if there is any way to make it with activex ,and how!
Thank u in advance!
|
|
|
|
|
The MSDN said, calling GetStockObject with SYSTEM_FONT will return:
+ Windows 95/98 and NT: The system font is MS Sans Serif.
+ Windows 2000: The system font is Tahoma
but I always have it return System.fon (like on Win3.x )
|
|
|
|
|
Dear Friends
Hi
i want to copy the contents of clipboard, everytime it is changing in a program variable say pText[].For i want to access Ctrl+c but i am not getting either through accelerator or through WM_KEYDOWN,WILL U PLEASE GIVE SOME small example for doing that.
Thanks in advance
Binay
|
|
|
|
|
make ur application as clipboard viewer using setclipboardviewer API and handle wm_drawclipboard and related messages. check msdn for further information
|
|
|
|
|
the program of print priview?It's style as if CoreDraw
Thanks a lot!
(VC6.0 MFC VIEW/FRAME)
ZHANGYIFEI
|
|
|
|
|
how can i get the region of printing page after cutting down
the size of region that may print!
ZHANGYIFEI
|
|
|
|
|
when i set the "Right to left Layout" property of Dialog. the compilation greets me with the error
" Dlg1.rc (89): error RC2104 : undefined keyword or key name: WS_EX_LAYOUT_RTL"
The complier generates this error as "WS_EX_LAYOUT_RTL" is not found.I have checked the same thing in Windows98 and Windows 2000 Operating system. What should I do.I want to change the allignment of Dialog.
2nd Qusetion.
I want to change the allignment at run time....and Dialog has been statistically created. Is it possible to change its
allignment at run time.
Have a good wishes for HELPER
|
|
|
|
|
|
Hi,
I want to create a virtual serial port (like a COM3). I want to write data on it, so another program thinks it comes from a real serial port (and vice versa).
I don't have a clue on how to begin writing this, so any help would be welcome.
Jef
|
|
|
|
|
Well, i read an article that shows how to make that XP skin your app, but i don't want that XP skin my Caption bar and buttons, and dialog either, i want to make my own skins(using MFC), but xp skin all of this, how can i make that xp doesn't skin my app?
|
|
|
|
|
I am uing VC6.0/W2k to develop a small app. to try some of the new GDI+ alpha chanel pen/brush stuff. The app. generate EMF file and play back on a printer DC. I found is emf file can only draw properly on the GDI+ app to the screen DC. It doesn't produce the right result on any printer DC. Why?
Is there any new supprise stuff behind GDI+ EMF file format!???
|
|
|
|