N
nullbert30
Unregistered / Unconfirmed
GUEST, unregistred user!
//////////////////////////////////////////////////////////////////////////////
mydll.cpp:
/////////////////////////////////////////////////////////////////////////////
#define UWM_MOUSEHOOK_MSG "{B30856F0-D3DD-11d4-A00B-006067718D04}"
HWND hMainWnd=NULL;
UINT UWM_MOUSEHOOK;
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
UWM_MOUSEHOOK=RegisterWindowMessage(UWM_MOUSEHOOK_MSG);
}
LRESULT Keyboardproc(int nCode,WPARAM wParam,LPARAM lParam)
{
PostMessage(hMainWnd,UWM_MOUSEHOOK,wParam,lParam);
return CallNextHookEx(NULL,nCode,wParam,lParam);
}
//////////////////////////////////////////////////////////////////////////////
MainFrm.cpp:
//////////////////////////////////////////////////////////////////////////////
#pragma comment(lib,"mydll.lib")
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
//}}AFX_MSG_MAP
ON_REGISTERED_MESSAGE(UWM_MOUSEHOOK,OnMyMouseMove)
END_MESSAGE_MAP()
编译提示UWM_MOUSEHOOK没定义,咋办呢?谢谢!
mydll.cpp:
/////////////////////////////////////////////////////////////////////////////
#define UWM_MOUSEHOOK_MSG "{B30856F0-D3DD-11d4-A00B-006067718D04}"
HWND hMainWnd=NULL;
UINT UWM_MOUSEHOOK;
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
UWM_MOUSEHOOK=RegisterWindowMessage(UWM_MOUSEHOOK_MSG);
}
LRESULT Keyboardproc(int nCode,WPARAM wParam,LPARAM lParam)
{
PostMessage(hMainWnd,UWM_MOUSEHOOK,wParam,lParam);
return CallNextHookEx(NULL,nCode,wParam,lParam);
}
//////////////////////////////////////////////////////////////////////////////
MainFrm.cpp:
//////////////////////////////////////////////////////////////////////////////
#pragma comment(lib,"mydll.lib")
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
//{{AFX_MSG_MAP(CMainFrame)
//}}AFX_MSG_MAP
ON_REGISTERED_MESSAGE(UWM_MOUSEHOOK,OnMyMouseMove)
END_MESSAGE_MAP()
编译提示UWM_MOUSEHOOK没定义,咋办呢?谢谢!