/*!
*/

#pragma once

#include <windows.h>

#pragma managed(push, off)

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

class CAppFramework
{
protected:
	HWND						m_hFrameWnd;
	HANDLE						m_hAppInstance;

	DWORD						m_windowStyle;

	RECT						m_clientRect;
	RECT						m_windowRect;
	BOOL						m_isWindowed;

	static CAppFramework*		s_owner;

public:
								CAppFramework();
	virtual						~CAppFramework();

	BOOL						Initialize(HINSTANCE hInstance, INT32 screenWidth, INT32 screenHeight);
	INT32						Run();

	virtual BOOL				OnInitialized() = 0;

	virtual BOOL				Update() = 0;
	virtual BOOL				ProcessWindowMessage(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam, LRESULT &resultOut) = 0;

protected:
	static LRESULT CALLBACK		FrameWndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
};

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

#pragma managed(pop)
