-
Notifications
You must be signed in to change notification settings - Fork 65
/
GameOverDlgProc.c
46 lines (38 loc) · 1015 Bytes
/
GameOverDlgProc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "GameOverDlgProc.h"
#include "MacroDefine.h"
//////////////////////////////////////////////////////////////////////////
LRESULT CALLBACK GameOverProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
HWND hStatic;
LOGFONT lf = {0};
HFONT hFont;
strcpy( lf.lfFaceName, "ËÎÌå" );
lf.lfWidth = 30;
lf.lfHeight = 50;
lf.lfWeight = FW_NORMAL;
lf.lfCharSet = GB2312_CHARSET;
lf.lfPitchAndFamily = 35;
hFont = CreateFontIndirect (&lf);
switch( message )
{
case WM_INITDIALOG:
hStatic = CreateWindow( TEXT("static"), TEXT("GAME OVER !"), WS_CHILD | WS_VISIBLE, 25, 50, 400, 50, hDlg, NULL, NULL, NULL );
SendMessage( hStatic, WM_SETFONT, (WPARAM)hFont, 0 );
return TRUE;
case WM_COMMAND:
switch( LOWORD(wParam) )
{
case IDC_EXIT_GAME:
EndDialog( hDlg, GAME_EXIT );
return TRUE;
case IDC_GAME_AGAIN:
EndDialog( hDlg, GAME_AGAIN );
return TRUE;
case IDC_RETURN_MAIN:
EndDialog( hDlg, GAME_MAIN );
return TRUE;
}
break;
}
return 0;
}