Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MSDN:Preventing Hangs in Windows Applications Pin
Erudite_Eric2-Nov-11 11:25
Erudite_Eric2-Nov-11 11:25 
Generale: SetTimer Pin
Erudite_Eric1-Nov-11 22:06
Erudite_Eric1-Nov-11 22:06 
GeneralRe: SetTimer Pin
David Crow1-Nov-11 9:29
David Crow1-Nov-11 9:29 
GeneralRe: SetTimer Pin
Chuck O'Toole1-Nov-11 10:16
Chuck O'Toole1-Nov-11 10:16 
AnswerRe: SetTimer Pin
Mark Salsbery31-Oct-11 12:32
Mark Salsbery31-Oct-11 12:32 
GeneralRe: SetTimer Pin
Chuck O'Toole31-Oct-11 12:59
Chuck O'Toole31-Oct-11 12:59 
GeneralRe: SetTimer Pin
Mark Salsbery31-Oct-11 14:48
Mark Salsbery31-Oct-11 14:48 
GeneralRe: SetTimer Pin
Chuck O'Toole31-Oct-11 15:00
Chuck O'Toole31-Oct-11 15:00 
You miss my point. If you have a loop like the OP that is doing something like polling for I/O then he's not getting back to the Windows message pump so his GUI is "unresponsive" (and his Timer requests aren't being handled - WM_TIMER). His problem is to *make* the GUI responsive while processing whatever he's doing. A "PeekMessage()" loop, strategically placed in his processing loop, will allow the Windows Messages to be processed. A "GetMessage()" loop, while it would make his GUI responsive, would totally hang *his* processing loop. So he needs a solution that keeps his loop running while allowing Windows to processes pending messages, hence "PeekMessage()".

Yes, threads might serve him better but at the cost of redesigning his app. A PeekMessage() loop is a quickie solution to this particular problem.
GeneralRe: SetTimer Pin
Erudite_Eric31-Oct-11 21:08
Erudite_Eric31-Oct-11 21:08 
GeneralRe: Thanks!!! Pin
columbos1492731-Oct-11 21:44
columbos1492731-Oct-11 21:44 
AnswerRe: example code with PumpMessages() Pin
App_1-Nov-11 8:53
App_1-Nov-11 8:53 
Questionalternative function for MCIWndCreate API Pin
VCProgrammer31-Oct-11 1:17
VCProgrammer31-Oct-11 1:17 
AnswerRe: alternative function for MCIWndCreate API Pin
Code-o-mat31-Oct-11 2:02
Code-o-mat31-Oct-11 2:02 
Question[SOLVED] Inline assembly syntax error.. Pin
CodingLover30-Oct-11 21:59
CodingLover30-Oct-11 21:59 
AnswerRe: Inline assembly syntax error.. Pin
Malli_S30-Oct-11 22:39
Malli_S30-Oct-11 22:39 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover30-Oct-11 23:41
CodingLover30-Oct-11 23:41 
AnswerRe: Inline assembly syntax error.. Pin
Richard MacCutchan30-Oct-11 23:50
mveRichard MacCutchan30-Oct-11 23:50 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover30-Oct-11 23:56
CodingLover30-Oct-11 23:56 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 0:51
enhzflep31-Oct-11 0:51 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 1:02
CodingLover31-Oct-11 1:02 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 1:18
enhzflep31-Oct-11 1:18 
GeneralRe: Inline assembly syntax error.. Pin
David Crow31-Oct-11 3:13
David Crow31-Oct-11 3:13 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 3:19
enhzflep31-Oct-11 3:19 
GeneralRe: Inline assembly syntax error.. Pin
Richard MacCutchan31-Oct-11 0:54
mveRichard MacCutchan31-Oct-11 0:54 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 1:03
CodingLover31-Oct-11 1:03 

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.