SetWindowsHookEx(.., GetMsgProc,...,...)
第二个参数我定义成:
LRESULT CALLBACK GetMsgProcint(nCode, WPARAM wParam, LPARAM lParam)
{
}
编译时说
--------------------Configuration: MyExe - Win32 Debug--------------------
error C2065: 'GetMsgProc' : undeclared identifier
error C2373: 'GetMsgProc' : redefinition; different type modifiers
为什么呢?
{
}你的函数申明为GetMsgProcint,可是你在SetWindowsHookEx(.., GetMsgProc,...,...) 里面却添GetMsgProc,那当然找不到啦。SetWindowsHookEx(.., GetMsgProcint,...,...)