#include "Game.h"
#include "cGameWin.h"
#include "resource.h"

cGameWin::cGameWin(){

}

cGameWin::~cGameWin(){

}

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

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

LRESULT cGameWin::Proc(UINT uMsg, WPARAM wParam, LPARAM lParam){
	switch(uMsg){
	case WM_CREATE:
		if(!OnCreate(wParam, lParam))
			return -1;
		return 0;
	case WM_DESTROY:
		OnDestroy(wParam, lParam);
		return 0;
	case WM_PAINT:
		OnPaint(wParam, lParam);
		return 0;
	}
	return DefProc(uMsg, wParam, lParam);
}


BOOL cGameWin::OnCreate(WPARAM wParam, LPARAM lParam){
	return TRUE;
}

void cGameWin::OnDestroy(WPARAM wParam, LPARAM lParam){
}

void cGameWin::OnPaint(WPARAM wParam, LPARAM lParam){
	PAINTSTRUCT ps;
	HDC hdc;
	hdc = BeginPaint(&ps);
	TextOut(hdc, 0, 0, "GameWin");
	EndPaint(&ps);
}