[求助]键盘的问题
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(int nCode,WPARAM wParam,LPARAM lParam){
KBDLLHOOKSTRUCT *pkh = (KBDLLHOOKSTRUCT *) lParam;
if (nCode==HC_ACTION)
{
BOOL bCtrlKeyDown =GetAsyncKeyState(VK_CONTROL)>>((sizeof(SHORT) * 8) - 1);
if (pkh->vkCode==VK_F11&&bCtrlKeyDown)
{
return CallNextHookEx(hkb, nCode, wParam, lParam);
}
}
MessageBox(0,0,0,0);/* vvvvvvvvvvv */
return 1;
}
如上钩子处理函数代码,在自己的程序中调用, 加入在标志处加入 MessageBox(0,0,0,0);/* vvvvvvvvvvv */则自己注册的热键会相应,而一旦没有该段代码则无反应,且改成MessageBeep(0)也不行.望指教.