ReactOS  0.4.15-dev-1377-ga59cecd
dialogs.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
8 {
9  switch (message)
10  {
11  static HWND hList;
12 
13  case WM_INITDIALOG:
14  {
15  LPTSTR lpDocType;
16  INT i;
17 
18  hList = GetDlgItem(hDlg,
19  IDC_LIST);
20 
22  {
23  if (AllocAndLoadString(&lpDocType,
24  hInstance,
25  i))
26  {
28  lpDocType);
29  LocalFree((HLOCAL)lpDocType);
30  }
31  }
32 
35  0,
36  0);
37 
38  return TRUE;
39  }
40 
41  case WM_COMMAND:
42  {
43  INT LbSel;
44 
45  if (HIWORD(wParam) == LBN_DBLCLK)
46  {
47  LbSel = (INT)SendMessage(hList,
49  0,
50  0);
51  EndDialog(hDlg,
52  LbSel);
53  return TRUE;
54  }
55 
56  switch (LOWORD(wParam))
57  {
58  case IDOK:
59  LbSel = (INT)SendMessage(hList,
61  0,
62  0);
63  EndDialog(hDlg,
64  LbSel);
65  return TRUE;
66 
67  case IDCANCEL:
68  EndDialog(hDlg, -1);
69  return TRUE;
70  }
71  }
72  }
73 
74  return FALSE;
75 }
76 
77 
78 
81  UINT message,
82  WPARAM wParam,
83  LPARAM lParam)
84 {
85  HWND hLicenseEditWnd;
86  static HICON hIcon = NULL;
87  static LPTSTR lpLicense = NULL;
88 
89  switch (message)
90  {
91  case WM_INITDIALOG:
92 
95  IMAGE_ICON,
96  16,
97  16,
98  0);
99  if (hIcon != NULL)
100  {
101  SendMessage(hDlg,
102  WM_SETICON,
103  ICON_SMALL,
104  (LPARAM)hIcon);
105  }
106 
107  hLicenseEditWnd = GetDlgItem(hDlg,
109 
110  if (AllocAndLoadString(&lpLicense,
111  hInstance,
112  IDS_LICENSE))
113  {
114  SetWindowText(hLicenseEditWnd,
115  lpLicense);
116  }
117  return TRUE;
118 
119  case WM_COMMAND:
120  if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
121  {
122  LocalFree((HLOCAL)lpLicense);
124  EndDialog(hDlg,
125  LOWORD(wParam));
126  return TRUE;
127  }
128 
129  break;
130  }
131 
132  return FALSE;
133 }
134 
#define LB_SETCURSEL
Definition: winuser.h:2045
#define IDI_ICON
Definition: resource.h:5
#define MAKEINTRESOURCE
Definition: winuser.h:591
Definition: tftpd.h:59
static HICON
Definition: imagelist.c:84
#define IDOK
Definition: winuser.h:824
#define IMAGE_ICON
Definition: winuser.h:212
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define IDS_DOC_TYPE_RICH_TEXT
Definition: resource.h:94
INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:80
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define TRUE
Definition: types.h:120
#define INT
Definition: polytest.cpp:20
#define CALLBACK
Definition: compat.h:35
#define ListBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:447
UINT_PTR WPARAM
Definition: windef.h:207
int32_t INT_PTR
Definition: typedefs.h:64
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
int32_t INT
Definition: typedefs.h:58
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define ICON_SMALL
Definition: tnclass.cpp:48
HINSTANCE hInstance
Definition: charmap.c:20
#define FALSE
Definition: types.h:117
#define IDS_DOC_TYPE_TEXT
Definition: resource.h:96
#define IDC_LIST
Definition: resource.h:93
LONG_PTR LPARAM
Definition: windef.h:208
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define LBN_DBLCLK
Definition: winuser.h:2053
INT_PTR CALLBACK NewDocSelDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:4
#define WM_COMMAND
Definition: winuser.h:1722
HWND hList
Definition: livecd.c:10
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define IDS_LICENSE
Definition: resource.h:28
HICON hIcon
Definition: msconfig.c:44
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
#define SetWindowText
Definition: winuser.h:5832
#define LB_GETCURSEL
Definition: winuser.h:2021
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define SendMessage
Definition: winuser.h:5818
#define HIWORD(l)
Definition: typedefs.h:247
#define LoadImage
Definition: winuser.h:5790
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_LICENSE_EDIT
Definition: resource.h:20