Lescha
asked on
WM_TIMER - different thread, separate entity?
Does SetTimer open a new thread? If not, can anyone explain to me why AfxMessageBox inside of OnTimer does not prevent further calls to OnTimer? In other words,
void OnTimer(...)
{
...
AfxMessageBox(...);
...
}
The message box appears... and then appears again, and again, without waiting for me to close the first one. It's like Windows is trying to process the next WM_TIMER message without waiting for the current on to complete.
If this is what happens, is there a normal way to prevent it? In other words, how can I block the timer without actually killing it?
void OnTimer(...)
{
...
AfxMessageBox(...);
...
}
The message box appears... and then appears again, and again, without waiting for me to close the first one. It's like Windows is trying to process the next WM_TIMER message without waiting for the current on to complete.
If this is what happens, is there a normal way to prevent it? In other words, how can I block the timer without actually killing it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Yes. When modal daialog is active, all other windows properly paint themself, this means, they handle WM_PAINT messag. Other messages, like WM_TIMER, are handled as well.
2. MB_SYSTEMMODAL is the same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. It doesn't block all windows of the system.
2. MB_SYSTEMMODAL is the same as MB_APPLMODAL except that the message box has the WS_EX_TOPMOST style. It doesn't block all windows of the system.
ASKER
Thanks a bunch! (Mostly, for explaining the modal/messages thing).
ASKER
By inference, a system modal dialog box will probably prevent the mouse/keyboard from all (or most of) the windows of the system, but not their other messages?