用勾子获取鼠标位置的一段代码,为什么编绎不通过?
先装入一个WH_MOUSE类型的钩子。在回调函数里:
if(wParam==WM_MOUSEMOVE)
{
int lpMouseHookStruct;
int MousePoint;
lpMouseHookStruct=(LPMOUSEHOOKSTRUCT)lparam;
MousePoint=lpMouseHookStruct->pt;
}//获取鼠标当前位置
在编译时出了两个错误
error c2440:"=" :cannot convert from 'struct tagMOUSEHOOKSTRUCT * ' to 'int'
This conversion requires a reinterpret-cast,a c-style cast or function-style cast
error c2227:left of ->pt 'must point to class/struct/union
请大侠给看一下,哪个地方出了错。