Click here to Skip to main content
15,901,982 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem in triggering events Pin
Roger Stoltz27-Apr-06 0:34
Roger Stoltz27-Apr-06 0:34 
GeneralRe: problem in triggering events Pin
rajeev8227-Apr-06 0:54
rajeev8227-Apr-06 0:54 
AnswerRe: problem in triggering events Pin
Roger Stoltz27-Apr-06 1:00
Roger Stoltz27-Apr-06 1:00 
GeneralRe: problem in triggering events Pin
rajeev8227-Apr-06 1:19
rajeev8227-Apr-06 1:19 
AnswerRe: problem in triggering events Pin
Roger Stoltz27-Apr-06 2:50
Roger Stoltz27-Apr-06 2:50 
QuestionWaiting for the thread end Pin
gomez_a26-Apr-06 23:44
gomez_a26-Apr-06 23:44 
AnswerRe: Waiting for the thread end Pin
Roger Stoltz27-Apr-06 0:38
Roger Stoltz27-Apr-06 0:38 
AnswerRe: Waiting for the thread end Pin
Stephen Hewitt27-Apr-06 0:41
Stephen Hewitt27-Apr-06 0:41 
First when you create the thread but before you let it run make sure you do the following (you will have to create it suspended):
pThread->m_bAutoDelete = FALSE;


There is no point in having a collection of CWinThread pointers if you have no way of knowing if the object pointed to has been delete or not!

Now you can wait for a thread to exit using the Win32 API as follows:
WaitForSingleObject(pThread->m_hThread, INFINITE);


Remember we've turned auto deletion off so you have to remember to delete the CWinThread objects when you're done with them - deleting one doesn't stop the thread running (if it's running).


Steve
Questionhow to write a log file Pin
vuyyuru26-Apr-06 22:50
vuyyuru26-Apr-06 22:50 
AnswerRe: how to write a log file Pin
Cedric Moonen26-Apr-06 22:54
Cedric Moonen26-Apr-06 22:54 
GeneralRe: how to write a log file Pin
vuyyuru27-Apr-06 1:53
vuyyuru27-Apr-06 1:53 
GeneralRe: how to write a log file Pin
Cedric Moonen27-Apr-06 2:02
Cedric Moonen27-Apr-06 2:02 
GeneralRe: how to write a log file Pin
kakan27-Apr-06 2:48
professionalkakan27-Apr-06 2:48 
QuestionCreating/Deleting Directories in Windows (no .nET) Pin
chasetoys26-Apr-06 22:47
chasetoys26-Apr-06 22:47 
AnswerRe: Creating/Deleting Directories in Windows (no .nET) Pin
kakan26-Apr-06 23:41
professionalkakan26-Apr-06 23:41 
AnswerRe: Creating/Deleting Directories in Windows (no .nET) Pin
Michael Dunn27-Apr-06 19:58
sitebuilderMichael Dunn27-Apr-06 19:58 
Questionconvert from char a[MAX_PATH] to LPCWSTR Pin
gbabu1726-Apr-06 22:25
gbabu1726-Apr-06 22:25 
AnswerRe: convert from char a[MAX_PATH] to LPCWSTR Pin
Nibu babu thomas26-Apr-06 22:31
Nibu babu thomas26-Apr-06 22:31 
GeneralRe: convert from char a[MAX_PATH] to LPCWSTR Pin
gbabu1726-Apr-06 22:50
gbabu1726-Apr-06 22:50 
GeneralRe: convert from char a[MAX_PATH] to LPCWSTR Pin
Nibu babu thomas26-Apr-06 22:53
Nibu babu thomas26-Apr-06 22:53 
GeneralRe: convert from char a[MAX_PATH] to LPCWSTR Pin
Cedric Moonen26-Apr-06 22:56
Cedric Moonen26-Apr-06 22:56 
GeneralRe: convert from char a[MAX_PATH] to LPCWSTR Pin
Hamid_RT27-Apr-06 2:06
Hamid_RT27-Apr-06 2:06 
GeneralRe: convert from char a[MAX_PATH] to LPCWSTR Pin
David Crow27-Apr-06 5:54
David Crow27-Apr-06 5:54 
Questiondesign pattern Pin
Krishnatv26-Apr-06 22:21
Krishnatv26-Apr-06 22:21 
AnswerRe: design pattern Pin
Nibu babu thomas26-Apr-06 22:29
Nibu babu thomas26-Apr-06 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.