ReactOS 0.4.15-dev-7942-gd23573b
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,
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
84{
85 HWND hLicenseEditWnd;
86 static HICON hIcon = NULL;
87 static LPTSTR lpLicense = NULL;
88
89 switch (message)
90 {
91 case WM_INITDIALOG:
92
96 16,
97 16,
98 0);
99 if (hIcon != NULL)
100 {
101 SendMessage(hDlg,
102 WM_SETICON,
104 (LPARAM)hIcon);
105 }
106
107 hLicenseEditWnd = GetDlgItem(hDlg,
109
110 if (AllocAndLoadString(&lpLicense,
111 hInstance,
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 IDC_LICENSE_EDIT
Definition: resource.h:20
#define IDI_ICON
Definition: resource.h:5
#define IDS_LICENSE
Definition: resource.h:28
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:59
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
HWND hList
Definition: livecd.c:10
INT_PTR CALLBACK AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:80
INT_PTR CALLBACK NewDocSelDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
Definition: dialogs.c:4
#define IDC_LIST
Definition: resource.h:93
#define IDS_DOC_TYPE_RICH_TEXT
Definition: resource.h:94
#define IDS_DOC_TYPE_TEXT
Definition: resource.h:96
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define INT
Definition: polytest.cpp:20
Definition: tftpd.h:60
#define ICON_SMALL
Definition: tnclass.cpp:48
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define ListBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:472
#define IDCANCEL
Definition: winuser.h:831
#define IMAGE_ICON
Definition: winuser.h:212
#define LBN_DBLCLK
Definition: winuser.h:2071
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:830
#define SendMessage
Definition: winuser.h:5843
#define LoadImage
Definition: winuser.h:5815
#define SetWindowText
Definition: winuser.h:5857
#define LB_SETCURSEL
Definition: winuser.h:2063
#define LB_GETCURSEL
Definition: winuser.h:2039
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2053
CHAR * LPTSTR
Definition: xmlstorage.h:192