Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIs it possible to suspend a thread when the thread has executed Sleep() statement and in sleep mode Pin
manoharbalu27-Sep-11 0:14
manoharbalu27-Sep-11 0:14 
AnswerRe: Is it possible to suspend a thread when it executes Sleep() statement Pin
Software_Developer27-Sep-11 0:59
Software_Developer27-Sep-11 0:59 
GeneralRe: Is it possible to suspend a thread when the thread executes Sleep() statement Pin
manoharbalu27-Sep-11 1:01
manoharbalu27-Sep-11 1:01 
AnswerRe: Is it possible to suspend a thread when it executes Sleep() statement [link fixed, thanks to Chris] Pin
CPallini27-Sep-11 1:02
mveCPallini27-Sep-11 1:02 
GeneralRe: Is it possible to suspend a thread when it executes Sleep() statement Pin
Chris Meech27-Sep-11 2:36
Chris Meech27-Sep-11 2:36 
GeneralRe: Is it possible to suspend a thread when it executes Sleep() statement Pin
CPallini27-Sep-11 2:52
mveCPallini27-Sep-11 2:52 
AnswerRe: Is it possible to suspend a thread when the thread has executed Sleep() statement and in sleep mode Pin
David Crow27-Sep-11 15:57
David Crow27-Sep-11 15:57 
Question[MFC] Keep thread alive until application exits Pin
Erik26-Sep-11 23:39
Erik26-Sep-11 23:39 
Hi,

I use the CWinThread class to have my CDialog GUI stay responsive while doing some lengthy calculation. However, my thread needs to stay alive, since it can receive some notification anytime while my application runs. The problem I have is that after InitInstance is done, my thread automatically enters the ExitInstance method, which I do not want. However, I want my thread to stay alive until I close my CDialog, and then enter ExitInstance. Any idea how this can be performed?

Thanks alot.
AnswerRe: [MFC] Keep thread alive until application exits Pin
Erudite_Eric26-Sep-11 23:43
Erudite_Eric26-Sep-11 23:43 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 4:46
professionalAlbert Holguin27-Sep-11 4:46 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Rajesh R Subramanian27-Sep-11 7:26
professionalRajesh R Subramanian27-Sep-11 7:26 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 7:30
professionalAlbert Holguin27-Sep-11 7:30 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 7:35
professionalAlbert Holguin27-Sep-11 7:35 
AnswerRe: [MFC] Keep thread alive until application exits Pin
Chuck O'Toole27-Sep-11 4:11
Chuck O'Toole27-Sep-11 4:11 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 7:51
professionalAlbert Holguin27-Sep-11 7:51 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Chuck O'Toole27-Sep-11 8:38
Chuck O'Toole27-Sep-11 8:38 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 9:24
professionalAlbert Holguin27-Sep-11 9:24 
AnswerRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 4:55
professionalAlbert Holguin27-Sep-11 4:55 
AnswerRe: [MFC] Keep thread alive until application exits Pin
Roger Allen27-Sep-11 6:10
Roger Allen27-Sep-11 6:10 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Chris Meech27-Sep-11 6:29
Chris Meech27-Sep-11 6:29 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Rajesh R Subramanian27-Sep-11 7:31
professionalRajesh R Subramanian27-Sep-11 7:31 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 7:32
professionalAlbert Holguin27-Sep-11 7:32 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Rajesh R Subramanian27-Sep-11 7:39
professionalRajesh R Subramanian27-Sep-11 7:39 
GeneralRe: [MFC] Keep thread alive until application exits Pin
Albert Holguin27-Sep-11 7:42
professionalAlbert Holguin27-Sep-11 7:42 
AnswerRe: [MFC] Keep thread alive until application exits Pin
Rajesh R Subramanian27-Sep-11 7:30
professionalRajesh R Subramanian27-Sep-11 7:30 

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.