whwindow.h

来自「真正的传奇源代码」· C头文件 代码 · 共 62 行

H
62
字号
#ifndef _WINDHORN_WINDOW
#define	_WINDHORN_WINDOW



/******************************************************************************************************************

	CWHApp Class Declaration

*******************************************************************************************************************/

class CWHApp
{
public:
//1: Constuctor/Destructor
	CWHApp();
	~CWHApp();

//2: Variables
protected:
	HINSTANCE			m_hInstance;
	__inline VOID		SethInstance(HINSTANCE hInst)	{ m_hInstance = hInst; }

//3: Methods
public:
	__inline HINSTANCE	GetSafehInstance()				{ return  m_hInstance; }

//4: Message Map
	virtual LRESULT	MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
};



/******************************************************************************************************************

	CWHWindow Class Declaration

*******************************************************************************************************************/
class CWHWindow : public CWHApp
{
//1: Constuctor/Destructor
public:
	CWHWindow();
	~CWHWindow();

//2: Variables
protected:
	HWND	m_hWnd;

//3: Methods
	BOOL	RegisterClass(CHAR* pszMenuName, CHAR* pszIconName);
public:
	BOOL	Create(HINSTANCE hInst, LPTSTR lpCaption = NULL, CHAR* pszMenuName = NULL, CHAR* pszIconName = NULL);
	__inline	HWND GetSafehWnd()					{ return m_hWnd; }

//4: Message Map
	virtual LRESULT MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	virtual LRESULT OnDestroy();
};

#endif //_WINDHORN_WINDOW

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?