ReactOS  0.4.12-dev-43-g63b00d8
about.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Services
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: base/applications/mscutils/servman/about.c
5  * PURPOSE: About dialog box message handler
6  * COPYRIGHT: Copyright 2005-2007 Ged Murphy <gedmurphy@reactos.org>
7  *
8  */
9 
10 #include "precomp.h"
11 
14 {
15  switch (message)
16  {
17  case WM_INITDIALOG:
18  {
19  HWND hLicenseEditWnd;
20 
21  hLicenseEditWnd = GetDlgItem(hDlg,
23  if (hLicenseEditWnd)
24  {
25  LPWSTR lpString;
26 
27  if (AllocAndLoadString(&lpString,
28  hInstance,
29  IDS_LICENSE))
30  {
31  SetWindowTextW(hLicenseEditWnd,
32  lpString);
33 
34  LocalFree(lpString);
35  }
36  }
37 
38  return TRUE;
39  }
40 
41  case WM_COMMAND:
42 
43  if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
44  {
45  EndDialog(hDlg,
46  LOWORD(wParam));
47  return TRUE;
48  }
49 
50  break;
51  }
52 
53  return FALSE;
54 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: about.c:13
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
int32_t INT_PTR
Definition: typedefs.h:62
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
UINT_PTR WPARAM
Definition: windef.h:207
HINSTANCE hInstance
Definition: charmap.c:20
LONG_PTR LPARAM
Definition: windef.h:208
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#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