chess.h

来自「五子棋游戏」· C头文件 代码 · 共 43 行

H
43
字号
///////////////////////////////////////////////////////////////////////////////
//	Chess.h
//	Date: 2004-8-5 21:16
//	A moving ball.
//
///////////////////////////////////////////////////////////////////////////////

#if	!defined _MOVINGBALL_H
#define	_MOVINGBALL_H

#include <windows.h>

///////////////////////////////////////////////////////////////////////////////

LRESULT CALLBACK WindowsProcedure( HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam );

class WinClass {
	public:
		WinClass( WNDPROC wndProc, const char* className, HINSTANCE hInstance );
		void Register()
		{
			::RegisterClass( & _class );
		}

	private:
		WNDCLASS _class;
};

class WinMaker {
	public:
		WinMaker() : _hWnd( NULL ) {}
		WinMaker( const char* szCaption, const char* className, HINSTANCE hInstance );
		void Show( int cmdShow )
		{
			::ShowWindow( _hWnd, cmdShow );
			::UpdateWindow( _hWnd );
		}

	protected:
		HWND _hWnd;
};

#endif	// _MOVINGBALL_H //

⌨️ 快捷键说明

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