'How to ignore message in the queue?
I am creating application with win32 GUI and I tried blocking and ignoring some window messages of the message queue in my message loop. For it, I tried this following code:
while (GetMessage(&msg, NULL, 0, 0) > 0)
{
TranslateMessage(&msg);
if (msg.message != WM_... /*to complete with messages to block*/) DispatchMessage(&msg);
}
But it does not work and I can not understand why. Normally, except some particular messages, all messages pass by the message loop, so the messages that I block should be ignored! What is not wrong with my code? Mayby I shoud try to rethink my message loop?
Thanks for reading and your help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
