27 lines
622 B
C++
27 lines
622 B
C++
#ifndef _COMMON_HOOKPROC_HPP_
|
|
#define _COMMON_HOOKPROC_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_VECTORHANDLER_HPP_
|
|
#include <common/vhandler.hpp>
|
|
#endif
|
|
|
|
class WinHookProc : public VectorHandler
|
|
{
|
|
public:
|
|
WinHookProc(void);
|
|
virtual ~WinHookProc();
|
|
BOOL hookWin(HWND hWnd);
|
|
BOOL unhookWin(void);
|
|
BOOL isOkay(void)const;
|
|
protected:
|
|
virtual DWORD winID(void)const;
|
|
void windowProcedure(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
|
|
private:
|
|
static LRESULT hookProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam);
|
|
WNDPROC mPrevHook;
|
|
HWND mhHookWnd;
|
|
};
|
|
#endif
|