forked from JoneyYang/PE-TOOLS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog_about.c
37 lines (27 loc) · 838 Bytes
/
dialog_about.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
#include "dialog_about.h"
HBITMAP hBitmap = NULL;
void InitDialogAbout()
{
hBitmap = LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP2));
HWND hStatic = CreateWindow(TEXT("STATIC"), NULL, WS_VISIBLE | WS_CHILD | SS_BITMAP, 10, 10, 150, 150, g_hwndDialogAbout, (HMENU)10000, g_hInstance, NULL);
SendMessage(hStatic, STM_SETIMAGE, (WPARAM)IMAGE_BITMAP, (LPARAM)hBitmap);
}
BOOL CALLBACK DialogProcAbout(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
BOOL result = TRUE;
switch (uMsg)
{
case WM_INITDIALOG:
g_hwndDialogAbout = hwndDlg;
InitDialogAbout();
break;
case WM_CLOSE:
if (hBitmap != NULL) DeleteObject((HBITMAP)hBitmap);
EndDialog(hwndDlg, 0);
break;
default:
result = FALSE;
break;
}
return result;
}