[RTL]
[reactos.git] / reactos / base / applications / mscutils / devmgmt / about.c
1 /*
2 * PROJECT: ReactOS Device Managment
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/devmgmt/about.c
5 * PURPOSE: About dialog box message handler
6 * COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy@gmail.com>
7 *
8 */
9
10 #include "precomp.h"
11
12 INT_PTR CALLBACK
13 AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
14 {
15 HWND hLicenseEditWnd;
16 HICON hIcon = NULL;
17 TCHAR strLicense[700];
18
19 switch (message)
20 {
21 case WM_INITDIALOG:
22
23 hIcon = (HICON)LoadImage(hInstance,
24 MAKEINTRESOURCE(IDI_MAIN_ICON),
25 IMAGE_ICON,
26 16,
27 16,
28 0);
29
30 SendMessage(hDlg,
31 WM_SETICON,
32 ICON_SMALL,
33 (LPARAM)hIcon);
34
35 hLicenseEditWnd = GetDlgItem(hDlg,
36 IDC_LICENSE_EDIT);
37
38 LoadString(hInstance,
39 IDS_LICENSE,
40 strLicense,
41 sizeof(strLicense) / sizeof(TCHAR));
42
43 SetWindowText(hLicenseEditWnd,
44 strLicense);
45
46 return TRUE;
47
48 case WM_COMMAND:
49
50 if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
51 {
52 DestroyIcon(hIcon);
53 EndDialog(hDlg,
54 LOWORD(wParam));
55 return TRUE;
56 }
57
58 break;
59 }
60
61 return FALSE;
62 }