ReactOS  0.4.12-dev-43-g63b00d8
about.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Character Map
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: base/applications/charmap/about.c
5  * PURPOSE: about dialog
6  * COPYRIGHT: Copyright 2007 Ged Murphy <gedmurphy@reactos.org>
7  *
8  */
9 
10 #include "precomp.h"
11 
12 static
13 INT_PTR
16  UINT message,
17  WPARAM wParam,
18  LPARAM lParam)
19 {
20  static HICON hIcon = NULL;
21 
22  switch (message)
23  {
24  case WM_INITDIALOG:
25  {
26  HWND hLicenseEditWnd;
27  WCHAR strLicense[700];
28 
29  hIcon = LoadImageW(hInstance,
31  IMAGE_ICON,
32  16,
33  16,
34  0);
35  if (hIcon)
36  {
37  SendMessageW(hDlg,
38  WM_SETICON,
39  ICON_SMALL,
40  (LPARAM)hIcon);
41  }
42 
43  hLicenseEditWnd = GetDlgItem(hDlg,
45 
48  strLicense,
49  sizeof(strLicense) / sizeof(WCHAR)))
50  {
51  SetWindowTextW(hLicenseEditWnd,
52  strLicense);
53  }
54 
55  return TRUE;
56  }
57 
58  case WM_COMMAND:
59  {
60  if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
61  {
62  DestroyIcon(hIcon);
63  EndDialog(hDlg,
64  LOWORD(wParam));
65  return TRUE;
66  }
67 
68  break;
69  }
70  }
71 
72  return FALSE;
73 }
74 
75 
76 VOID
78 {
81  hWndParent,
83 }
#define IDI_ICON
Definition: resource.h:5
Definition: tftpd.h:59
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
#define IMAGE_ICON
Definition: winuser.h:212
VOID ShowAboutDlg(HWND hWndParent)
Definition: about.c:77
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
int32_t INT_PTR
Definition: typedefs.h:62
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
#define ICON_SMALL
Definition: tnclass.cpp:48
HINSTANCE hInstance
Definition: charmap.c:20
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
LONG_PTR LPARAM
Definition: windef.h:208
#define IDD_ABOUTBOX
Definition: resource.h:8
smooth NULL
Definition: ftsmooth.c:416
static INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: about.c:15
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4268
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
unsigned int UINT
Definition: ndis.h:50
#define WM_COMMAND
Definition: winuser.h:1716
#define IDS_LICENSE
Definition: resource.h:28
HICON hIcon
Definition: msconfig.c:44
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_LICENSE_EDIT
Definition: resource.h:20