什么叫屏蔽鼠标信息呢? 屏蔽鼠标消息?
用级低鼠标钩子:
HHOOK g_LowLevelMouseHook=NULL; //钩子句柄
LRESULT CALLBACK LowLevelMouseProc(int nCode,WPARAM wParam, LPARAM lParam)
{
if (nCode<0 )
return CallNextHookEx(g_LowLevelMouseHook,nCode,wParam,lParam);
POINT point=((MSLLHOOKSTRUCT*)lParam)->pt;
switch (wParam)
{
case WM_MOUSEMOVE:
{
}
break;
case WM_RBUTTONDOWN:
{
trace("WM_RBUTTONDOWN");
return 1; //屏蔽此消息
}
break;
}
return CallNextHookEx(g_LowLevelMouseHook,nCode,wParam,lParam); //传递钩子信息
}
// 启动钩子
g_LowLevelMouseHook=SetWindowsHookEx(WH_MOUSE_LL,LowLevelMouseProc,GetModuleHandle(NULL),0);