I try to hook it with several messages
Code:
if(wParam==0)
{
   pcwp=(CWPSTRUCT*)lp;
   switch(pcwp->messgae)
   {
      case WM_SIZE:
      case WM_CLOSE:
      case WM_ACTIVATE:
        boolVar=TRUE;
      break;
   }
}
but only WM_ACTIVATE gets executed
and It seems my hook only applies to the main windows, not all windows on desktop

Thanks