#include "Game.h"
#include "cGameAppWin.h"
#include "resource.h"

cGameAppWin::cGameAppWin(){

}

cGameAppWin::~cGameAppWin(){

}

BOOL cGameAppWin::RegisterClass(){
	return cWindow::RegisterClass(
		"GameAppWin", 
		CS_HREDRAW | CS_VREDRAW, 
		LoadIcon(*GetGameApp(), MAKEINTRESOURCE(IDR_GAMEAPP)),
		LoadCursor(NULL, MAKEINTRESOURCE(IDC_ARROW)),
		(HBRUSH)GetStockObject(BLACK_BRUSH));
}

//////////////////////////////////////////////////////////////////////
// Window Prodedure
//////////////////////////////////////////////////////////////////////

LRESULT cGameAppWin::Proc(UINT uMsg, WPARAM wParam, LPARAM lParam){
	switch(uMsg){
	case WM_CREATE:
		pChild = 0;
		return 0;
	case WM_SETFOCUS:
		if(pChild) pChild->SetFocus();
		return 0;
	case WM_CLOSE:
		PostQuitMessage(0);
		return 0;
	}
	return DefProc(uMsg, wParam, lParam);
}
