-
Notifications
You must be signed in to change notification settings - Fork 0
/
AboutDlg.c
51 lines (44 loc) · 955 Bytes
/
AboutDlg.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
47
48
49
50
51
#include <windows.h>
#include "AboutDlg.h"
#include "Globals.h"
#include "Resource.h"
/* Dialog procedure for our "about" dialog */
BOOL FAR PASCAL AboutDialogProc(hwndDlg, uMsg, wParam, lParam)
HWND hwndDlg;
unsigned uMsg;
WORD wParam;
LONG lParam;
{
switch (uMsg)
{
case WM_COMMAND:
{
WORD id = wParam;
switch (id)
{
case IDOK:
case IDCANCEL:
{
EndDialog(hwndDlg, id);
return TRUE;
}
}
break;
}
case WM_INITDIALOG:
{
return TRUE;
}
}
return FALSE;
}
/* Show our "about" dialog */
void ShowAboutDialog(owner)
HWND owner;
{
/* Create dialog callback thunk */
FARPROC aboutProc = MakeProcInstance(AboutDialogProc, g_hInstance);
DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_ABOUTDIALOG), owner, aboutProc);
/* Free dialog callback thunk */
FreeProcInstance(aboutProc);
}