#ifndef cGameApp_H
#define cGameApp_H

#include <windows.h>

class cGameApp{
protected:
	HINSTANCE hInstance; // 인스턴스 핸들
	HWND hWnd; // 애플리케이션 윈도우 핸들

	bool OpenApp();
	void CloseApp();
	int MessageLoop();

	// 윈도우 메시지 핸들러
	static LRESULT CALLBACK StaticWndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
	LRESULT WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
	bool OnCreate(WPARAM wParam, LPARAM lParam);
	void OnDestroy(WPARAM wParam, LPARAM lParam);
	void OnPaint(WPARAM wParam, LPARAM lParam);

public:

	cGameApp();
	virtual ~cGameApp();

	int Main(HINSTANCE _hInstance, LPSTR lpCmdLine, int nShowCmd);

	HWND GetWindow(){ return hWnd; }
	HINSTANCE GetInstance(){ return hInstance; }


};

#endif
