AxibugEmuOnline/virtuanessrc097-master/WndHook.h

38 lines
1.4 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// メッセージフィルタリングサポートクラス
//
#ifndef __CWNDHOOK_INCLUDED__
#define __CWNDHOOK_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// prototypes
class CWnd;
class CWndHook
{
public:
static void Initialize();
static void Release();
static void SetFiltering( BOOL bMode ) { m_bMsgFiltering = bMode; }
static BOOL WalkPreTranslateTree( MSG* lpMsg );
protected:
static LRESULT CALLBACK MessageFilterProc( INT code, WPARAM wParam, LPARAM lParam );
// メッセージをフィルタリングするかどうかのフラグ
static BOOL m_bMsgFiltering;
// メッセージがフィルタリング中かどうかのフラグ
static BOOL m_bMsgFilter;
// 元のフックプロシージャ
static HHOOK m_hOldMsgFilter;
private:
};
#endif // !__CWNDHOOK_INCLUDED__