Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed Help for PropertySheet or TabCtrl. Pin
Le@rner11-Mar-09 21:38
Le@rner11-Mar-09 21:38 
AnswerRe: Need Help for PropertySheet or TabCtrl. Pin
wo will rock you11-Mar-09 22:23
wo will rock you11-Mar-09 22:23 
GeneralRe: Need Help for PropertySheet or TabCtrl. Pin
Le@rner11-Mar-09 22:27
Le@rner11-Mar-09 22:27 
QuestionBreakpoint is Disabling automatically while debugging Pin
hemlat11-Mar-09 20:58
hemlat11-Mar-09 20:58 
AnswerRe: Breakpoint is Disabling automatically while debugging Pin
Cedric Moonen11-Mar-09 21:09
Cedric Moonen11-Mar-09 21:09 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
hemlat11-Mar-09 21:17
hemlat11-Mar-09 21:17 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
Cedric Moonen11-Mar-09 21:25
Cedric Moonen11-Mar-09 21:25 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
hemlat11-Mar-09 21:45
hemlat11-Mar-09 21:45 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
Cedric Moonen11-Mar-09 21:50
Cedric Moonen11-Mar-09 21:50 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
hemlat11-Mar-09 22:50
hemlat11-Mar-09 22:50 
AnswerRe: Breakpoint is Disabling automatically while debugging Pin
Stuart Dootson11-Mar-09 23:16
professionalStuart Dootson11-Mar-09 23:16 
GeneralRe: Breakpoint is Disabling automatically while debugging Pin
hemlat12-Mar-09 1:49
hemlat12-Mar-09 1:49 
QuestionHow to remove compile warnings in VC++ 2008? Pin
KaKa'11-Mar-09 20:34
KaKa'11-Mar-09 20:34 
AnswerRe: How to remove compile warnings in VC++ 2008? Pin
Cedric Moonen11-Mar-09 21:11
Cedric Moonen11-Mar-09 21:11 
AnswerRe: How to remove compile warnings in VC++ 2008? Pin
«_Superman_»11-Mar-09 21:45
professional«_Superman_»11-Mar-09 21:45 
AnswerRe: How to remove compile warnings in VC++ 2008? Pin
Joe Woodbury12-Mar-09 7:07
professionalJoe Woodbury12-Mar-09 7:07 
Questionstop main thread and resume later Pin
_T("No name")11-Mar-09 20:23
_T("No name")11-Mar-09 20:23 
AnswerRe: stop main thread and resume later Pin
ShiXiangYang11-Mar-09 20:52
ShiXiangYang11-Mar-09 20:52 
GeneralRe: stop main thread and resume later Pin
_T("No name")11-Mar-09 21:13
_T("No name")11-Mar-09 21:13 
GeneralRe: stop main thread and resume later Pin
wo will rock you11-Mar-09 22:58
wo will rock you11-Mar-09 22:58 
GeneralRe: stop main thread and resume later Pin
Cedric Moonen11-Mar-09 21:19
Cedric Moonen11-Mar-09 21:19 
AnswerRe: stop main thread and resume later Pin
Cedric Moonen11-Mar-09 21:17
Cedric Moonen11-Mar-09 21:17 
Which kind of application are you working on ? If it is a win32 or MFC application, I strongly advice not to stop the main thread because no messages will be processed anymore and your UI will hang.
If it is a console application and you want to wait until something happens, then using an event is one of the way to do it: simply call WaitForSingleObject[^] which will wait until the event you passed to handle is signaled. To crate the event, call CreateEvent[^]. In your separate thread, once you need to signal the main thread, call SetEvent[^], which will set the event and end the wait in the main thread.
These are the win32 functions, there are also MFC versions if you need.

Cédric Moonen
Software developer

Charting control [v1.5]
OpenGL game tutorial in C++

GeneralRe: stop main thread and resume later Pin
_T("No name")11-Mar-09 22:08
_T("No name")11-Mar-09 22:08 
GeneralRe: stop main thread and resume later Pin
_T("No name")12-Mar-09 2:51
_T("No name")12-Mar-09 2:51 
GeneralRe: stop main thread and resume later Pin
Cedric Moonen12-Mar-09 3:04
Cedric Moonen12-Mar-09 3:04 

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.