Переопределение Alt + Tab
В данном коде не переопределяется комб. Alt + Tab !!!
//---------------------------------------------------------------------------
#include <windows.h>
//---------------------------------------------------------------------------
#pragma argsused
LRESULT CALLBACK GetMsgProc(int code,WPARAM wParam,LPARAM lParam)
{
tagMSG* lmsg=new tagMSG();
lmsg=(tagMSG*)lParam;
if(lmsg->message==WM_HOTKEY)
{
switch(lmsg->wParam)
{
case 101:
{
PostQuitMessage(code);
}break;
case 100:
{
MessageBox(NULL,"ALT + TAB !","",MB_OK+MB_ICONWARNING);
}break;
}
}
//return CallNextHookEx(hHook,code,wParam,lParam);
}
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
if(RegisterHotKey(NULL,100,MOD_ALT,VK_TAB))
{
MessageBox(NULL,"HOTKEY!","",MB_OK+MB_ICONWARNING);
}
RegisterHotKey(NULL,101,MOD_ALT,'Q');
SetWindowsHookEx(WH_GETMESSAGE,(HOOKPROC)GetMsgProc,hInstance,NULL);
tagMSG* Msg=new tagMSG();
while(GetMessage(Msg,NULL,0,0)){}
}