Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionDisable window.. Pin
siva45511-Mar-09 20:12
siva45511-Mar-09 20:12 
AnswerRe: Disable window.. Pin
«_Superman_»11-Mar-09 20:18
professional«_Superman_»11-Mar-09 20:18 
AnswerRe: Disable window.. Pin
Jijo.Raj11-Mar-09 20:33
Jijo.Raj11-Mar-09 20:33 
AnswerRe: Disable window.. Pin
siva45511-Mar-09 20:35
siva45511-Mar-09 20:35 
QuestionNeed help on MCI Pin
John50211-Mar-09 19:59
John50211-Mar-09 19:59 
AnswerRe: Need help on MCI Pin
aks.11-Mar-09 22:03
aks.11-Mar-09 22:03 
GeneralRe: Need help on MCI Pin
John50212-Mar-09 0:01
John50212-Mar-09 0:01 
GeneralRe: Need help on MCI Pin
aks.23-Mar-09 19:24
aks.23-Mar-09 19:24 
QuestionDirectShow Filter in VC++ 2008 Pin
Andy Rama11-Mar-09 19:49
Andy Rama11-Mar-09 19:49 
QuestionCompiler emits more warnings then vc++ Pin
shaina223111-Mar-09 19:16
shaina223111-Mar-09 19:16 
AnswerRe: Compiler emits more warnings then vc++ Pin
Naveen11-Mar-09 20:15
Naveen11-Mar-09 20:15 
AnswerRe: Compiler emits more warnings then vc++ Pin
shaina223111-Mar-09 20:26
shaina223111-Mar-09 20:26 
GeneralRe: Compiler emits more warnings then vc++ Pin
shaina223111-Mar-09 21:23
shaina223111-Mar-09 21:23 
GeneralRe: Compiler emits more warnings then vc++ Pin
Cedric Moonen11-Mar-09 21:24
Cedric Moonen11-Mar-09 21:24 

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.