#include "Game.h"
#include "cTitleWin.h"
#include "resource.h"

cTitleWin::cTitleWin(){

}

cTitleWin::~cTitleWin(){

}

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

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

LRESULT cTitleWin::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 cTitleWin::OnCreate(WPARAM wParam, LPARAM lParam){
	return TRUE;
}

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

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