Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCalling conventions Pin
Cedric Moonen17-Apr-03 23:09
Cedric Moonen17-Apr-03 23:09 
GeneralRe: Calling conventions Pin
Bartosz Bien18-Apr-03 1:30
Bartosz Bien18-Apr-03 1:30 
GeneralWhat's wrong with this codes? But it generates Stack Overflow exception. Pin
DengJW17-Apr-03 20:30
DengJW17-Apr-03 20:30 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
David Crow18-Apr-03 4:21
David Crow18-Apr-03 4:21 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
Joe Woodbury18-Apr-03 6:11
professionalJoe Woodbury18-Apr-03 6:11 
GeneralWhat's wrong with this codes? But it generates Stack Overflow exception. Pin
DengJW17-Apr-03 20:25
DengJW17-Apr-03 20:25 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
chifor17-Apr-03 22:32
chifor17-Apr-03 22:32 
GeneralRe: What's wrong with this codes? But it generates Stack Overflow exception. Pin
DengJW18-Apr-03 21:21
DengJW18-Apr-03 21:21 
You are most likely right. The funciton (while uncommented) of AfxMessageBox(_T("Failed to create the main window!")); never be reached.

Thus I called KillTimer somewhere in the program to kill ID_PLAYTIME_EVENT and there were no more Stack Overflow problems.

But question again:

How do the following codes work? Once this code being called and run, how does it exit the while loop? Is it the correct way to process the message queue?

while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}

From my tests, once the program runs to this code, the while loop will exit forever until exiting the entire program. Actually that is what I had expected so that some other codes can run on a multitasking windows such 2000.


DJ
Questionempty CDocument??? Pin
alex.barylski17-Apr-03 19:17
alex.barylski17-Apr-03 19:17 
AnswerRe: empty CDocument??? Pin
Bartosz Bien17-Apr-03 22:42
Bartosz Bien17-Apr-03 22:42 
GeneralRe: empty CDocument??? Pin
alex.barylski18-Apr-03 7:55
alex.barylski18-Apr-03 7:55 
GeneralRe: empty CDocument? Sure! Pin
Bartosz Bien18-Apr-03 8:34
Bartosz Bien18-Apr-03 8:34 
GeneralQuestion about playing .wav files using mmio functions Pin
novicedude17-Apr-03 18:21
novicedude17-Apr-03 18:21 
GeneralRe: Question about playing .wav files using mmio functions Pin
chifor17-Apr-03 21:14
chifor17-Apr-03 21:14 
GeneralSetTimer Pin
ZarrinPour17-Apr-03 18:20
ZarrinPour17-Apr-03 18:20 
GeneralRe: SetTimer Pin
Ravi Bhavnani17-Apr-03 19:28
professionalRavi Bhavnani17-Apr-03 19:28 
GeneralRe: SetTimer Pin
Toni7817-Apr-03 19:34
Toni7817-Apr-03 19:34 
GeneralRe: SetTimer Pin
Michael Dunn17-Apr-03 19:36
sitebuilderMichael Dunn17-Apr-03 19:36 
GeneralRe: SetTimer Pin
Ravi Bhavnani17-Apr-03 20:44
professionalRavi Bhavnani17-Apr-03 20:44 
GeneralRe: SetTimer Pin
David Crow18-Apr-03 4:26
David Crow18-Apr-03 4:26 
GeneralRestrict user from accessing drives Pin
svsrikanth17-Apr-03 18:07
svsrikanth17-Apr-03 18:07 
GeneralRe: Restrict user from accessing drives Pin
David Crow18-Apr-03 5:01
David Crow18-Apr-03 5:01 
GeneralQuestion about the state of a stream. Pin
George217-Apr-03 17:18
George217-Apr-03 17:18 
GeneralTwo programs - Same file Instantaneous write and read. Pin
Pecan20417-Apr-03 16:52
Pecan20417-Apr-03 16:52 
GeneralRe: Two programs - Same file Instantaneous write and read. Pin
Michael Dunn17-Apr-03 17:01
sitebuilderMichael Dunn17-Apr-03 17:01 

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.