Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Problem in Closing a file window. Pin
David Crow26-Feb-08 3:29
David Crow26-Feb-08 3:29 
GeneralReceived the Message With SMTP ( Get Mail ) Pin
MmTurner25-Feb-08 22:03
MmTurner25-Feb-08 22:03 
GeneralRe: Received the Message With SMTP ( Get Mail ) Pin
Tarmo Kalda25-Feb-08 23:08
Tarmo Kalda25-Feb-08 23:08 
GeneralRe: Received the Message With SMTP ( Get Mail ) Pin
David Crow26-Feb-08 3:29
David Crow26-Feb-08 3:29 
GeneralWM_TIMER message never arrives [modified] Pin
Hanan88825-Feb-08 21:59
Hanan88825-Feb-08 21:59 
QuestionRe: WM_TIMER message never arrives Pin
Rajkumar R25-Feb-08 22:27
Rajkumar R25-Feb-08 22:27 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 22:38
Hanan88825-Feb-08 22:38 
GeneralRe: WM_TIMER message never arrives Pin
Rajkumar R25-Feb-08 23:59
Rajkumar R25-Feb-08 23:59 
Hanan888 wrote:
I was sure that my message peeking loop was pretty standard. I can't see the problem you indicated.
Please describe it if you have the time.


"pretty standard" please give the standard committee link for this.

typically, in win32 samples, i seen message loop with GetMessage() in winmain like,
while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0)
{
if (bRet == -1)
{
// handle the error and possibly exit
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

PeekMessage is used, if you are doing some lengthy operation and want to examine the message queue in between.


Hanan888 wrote:
Please describe it if you have the time.

just replace your message loop with GetMessage() and compare the processor usage in Task Manager.
In my HT machine, i am getting almost 0% using GetMessage(), and using your peekmessage() more than 50%, iam sure in single processor machine it will be more than 90%.
GeneralRe: WM_TIMER message never arrives Pin
Hanan88826-Feb-08 0:20
Hanan88826-Feb-08 0:20 
GeneralRe: WM_TIMER message never arrives Pin
Rajkumar R26-Feb-08 0:41
Rajkumar R26-Feb-08 0:41 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88826-Feb-08 0:57
Hanan88826-Feb-08 0:57 
GeneralRe: WM_TIMER message never arrives Pin
ramana.g25-Feb-08 22:30
ramana.g25-Feb-08 22:30 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 22:42
Hanan88825-Feb-08 22:42 
GeneralRe: WM_TIMER message never arrives Pin
KarstenK25-Feb-08 22:41
mveKarstenK25-Feb-08 22:41 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 22:47
Hanan88825-Feb-08 22:47 
GeneralRe: WM_TIMER message never arrives Pin
Michael Schubert25-Feb-08 22:43
Michael Schubert25-Feb-08 22:43 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 22:52
Hanan88825-Feb-08 22:52 
GeneralRe: WM_TIMER message never arrives Pin
ramana.g25-Feb-08 22:59
ramana.g25-Feb-08 22:59 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 23:07
Hanan88825-Feb-08 23:07 
GeneralRe: WM_TIMER message never arrives Pin
Tarmo Kalda25-Feb-08 23:13
Tarmo Kalda25-Feb-08 23:13 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 23:25
Hanan88825-Feb-08 23:25 
GeneralRe: WM_TIMER message never arrives Pin
Michael Schubert25-Feb-08 23:01
Michael Schubert25-Feb-08 23:01 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 23:09
Hanan88825-Feb-08 23:09 
GeneralRe: WM_TIMER message never arrives Pin
ramana.g25-Feb-08 23:22
ramana.g25-Feb-08 23:22 
GeneralRe: WM_TIMER message never arrives Pin
Hanan88825-Feb-08 23:31
Hanan88825-Feb-08 23:31 

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.