CODE
bool CTestMessageFilter::pretranslate_message(MSG *p_msg)
{
if (p_msg->message == WM_SYSCOMMAND)
{
console::printf("SysCommand: 0x%X", p_msg->wParam);
}
return false;
}
{
if (p_msg->message == WM_SYSCOMMAND)
{
console::printf("SysCommand: 0x%X", p_msg->wParam);
}
return false;
}
and run it, we'll see that on Vista/Win7 only SC_RESTORE is passed to message filter (and no messages at all are passed on WinXP).
This happens when we use window buttons (minimize, maximize, restore). It's a bit odd, because messages from corresponding menu items in window menu are passed correctly.