// cAppWindow.h: interface for the cAppWindow class.
//
//////////////////////////////////////////////////////////////////////

#ifndef cAppWindow_H
#define cAppWindow_H

#include "cWindow.h"

template <class cWinApp>
class cAppWindow : public cWindow{
private:
	static bool ClassRegistered;

protected:
	
	cWinApp *pWinApp;

	virtual bool RegisterClass(HINSTANCE hInstance);
	virtual char *GetClassName(){ return pWinApp->GetAppName(); }
	virtual BOOL IsClassRegistered(){ return ClassRegistered; }
	virtual LRESULT WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam);


public:
	cAppWindow();
	cAppWindow(cWinApp *_pWinApp) : pWinApp(_pWinApp){}
	virtual ~cAppWindow();

	virtual bool Create();
};

#endif
