I have a function that processes messages, and there I catch certain messages outside of WindowProcedure to trigger the desired behavior.
The problem is that although it seems that other messages work as needed, for some reason I cannot catch the message WM_SIZE.
WM_SIZEdisplayed in WindowProcedure, but I can not find the reason why my function is not visible. Is there a problem in my method of reading the current HWND?
Currently function:
int OSMessages(void)
{
MSG msg;
HWND actwnd = GetActiveWindow();
if ( PeekMessage(&msg, actwnd, 0, 0, PM_REMOVE) )
{
if (msg.message == WM_QUIT)
{
printf("QUIT");
return -1;
}
else if (msg.message == WM_SIZE)
{
printf("RESIZE");
return 1;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
source
share