www.pudn.com > DirectX的游戏代码.rar > BoxGame.cpp
#include "BoxGame.h"
#include "Game.h"
CGame g_game;
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpCmdLine,int nCmdShow)
{
MSG msg;
g_cmd_show=nCmdShow;
g_h_instance=hInstance;
if(!InitApplication())
{
return 0;
}
while(1)
{
if( PeekMessage(&msg,NULL,0,0,PM_REMOVE)>0)
{
if(msg.message==WM_QUIT)
{
break;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
g_game.Game_Main();
}
return msg.wParam;
}