主窗口回调函数

==============

wid
This commit is contained in:
Mr.Wid 2013-04-04 14:16:10 +08:00
parent 9254cd4b23
commit d9e0f8f6fe
2 changed files with 38 additions and 0 deletions

24
GameWndProc.c Normal file
View File

@ -0,0 +1,24 @@
#include "GameWndProc.h"
//////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK WndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
{
static int gameStatus = CM_UN_START;
LRESULT valReturn;
switch( gameStatus )
{
case CM_UN_START:
valReturn = DealBeginMenuMsg( hwnd, message, wParam, lParam );
if( valReturn == CM_START_GAME )
gameStatus = CM_START_ED;
return valReturn;
case CM_START_ED:
return PlayingProc( hwnd, message, wParam, lParam );
}
return DefWindowProc( hwnd, message, wParam, lParam );
}

14
GameWndProc.h Normal file
View File

@ -0,0 +1,14 @@
#pragma once
//////////////////////////////////////////////////////////////////////////
#include <windows.h>
#include "DealBeginMenuMsg.h"
#include "PlayingProc.h"
#include "MacroDefine.h"
#include "resource.h"
//////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );