[问题] Mouse Hook修改鼠标位置讯息

楼主: RexBT (象棋/不悔棋)   2013-07-22 11:29:52
想请问我目前想做一个Mouse Hook
当我接收到Mouse Move的讯息后,串改lParam内x,y座标的值
例如
永远都是贴x轴在上下动
以下是我的callback function
LRESULT CALLBACK MouseHookProc2(int nCode, WPARAM wParam, LPARAM lParam)
{
if(wParam == WM_MOUSEMOVE ||wParam == WM_NCMOUSEMOVE)
{
MOUSEHOOKSTRUCT* data=(MOUSEHOOKSTRUCT*) lParam;
LPARAM lParam2= MAKELPARAM(0,data->pt.y);
return CallNextHookEx(NULL,nCode,wParam,lParam2);
}
return CallNextHookEx(NULL,nCode,wParam,lParam);
}
但执行结果,每次鼠标移动都是照常
没有被修改过
请问有任何大大有试过写这样的function吗
可以指点迷津?

Links booklink

Contact Us: admin [ a t ] ucptt.com