I'm sorry if I asked something ridiculous (I'm a win32 noob) but I wonder if it would happen.Is it possible for us to change the message according to ourselves and process it in the switch (message) as in the code?
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message){
case WM_DESTROY:
PostQuitMessage(0);
break;
case FindWindowA(NULL,"Task Manager"): // like this
//do something
break;
default:
return DefWindowProc(hwnd,message,wParam,lParam);
}
return 0;
}