ReactOS 0.4.15-dev-7931-gfd331f1
groups.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS User Manager Control Panel
4 * FILE: dll/cpl/usrmgr/groups.c
5 * PURPOSE: Groups property page
6 *
7 * PROGRAMMERS: Eric Kohl
8 */
9
10#include "usrmgr.h"
11
12typedef struct _GROUP_DATA
13{
15
17
19
20
21static VOID
23{
25 RECT rect;
26 TCHAR szStr[32];
27
29
30 memset(&column, 0x00, sizeof(column));
32 column.fmt = LVCFMT_LEFT;
33 column.cx = (INT)((rect.right - rect.left) * 0.40);
34 column.iSubItem = 0;
35 LoadString(hApplet, IDS_NAME, szStr, sizeof(szStr) / sizeof(szStr[0]));
36 column.pszText = szStr;
38
39 column.cx = (INT)((rect.right - rect.left) * 0.60);
40 column.iSubItem = 1;
41 LoadString(hApplet, IDS_DESCRIPTION, szStr, sizeof(szStr) / sizeof(szStr[0]));
42 column.pszText = szStr;
44}
45
46
47static VOID
49{
50 NET_API_STATUS netStatus;
52 DWORD entriesread;
53 DWORD totalentries;
54 DWORD_PTR resume_handle = 0;
55 DWORD i;
56 LV_ITEM lvi;
57 INT iItem;
58
59 for (;;)
60 {
61 netStatus = NetLocalGroupEnum(NULL, 1, (LPBYTE*)&pBuffer,
62 1024, &entriesread,
63 &totalentries, &resume_handle);
64 if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA)
65 break;
66
67 for (i = 0; i < entriesread; i++)
68 {
69 memset(&lvi, 0x00, sizeof(lvi));
70 lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
71 lvi.pszText = pBuffer[i].lgrpi1_name;
72 lvi.state = 0;
73 lvi.iImage = 0;
74 iItem = ListView_InsertItem(hwndListView, &lvi);
75
77 pBuffer[i].lgrpi1_comment);
78 }
79
81
82 /* No more data left */
83 if (netStatus != ERROR_MORE_DATA)
84 break;
85 }
86
87}
88
89
90static VOID
92{
93 TCHAR szGroupName[UNLEN + 1];
94 INT iItem;
95 HWND hwndLV;
96 PLOCALGROUP_INFO_1 pGroupInfo = NULL;
97
98 hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
99 iItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
100 if (iItem == -1)
101 return;
102
103 /* Get the group name */
105 iItem, 0,
106 szGroupName,
107 UNLEN + 1);
108
109 NetLocalGroupGetInfo(NULL, szGroupName, 1, (LPBYTE*)&pGroupInfo);
110
111 ListView_SetItemText(hwndLV, iItem, 1,
112 pGroupInfo->lgrpi1_comment);
113
114 NetApiBufferFree(pGroupInfo);
115}
116
117
120 UINT uMsg,
123{
124 PLOCALGROUP_INFO_1 groupInfo;
125 INT nLength;
126
128
129 groupInfo = (PLOCALGROUP_INFO_1)GetWindowLongPtr(hwndDlg, DWLP_USER);
130
131 switch (uMsg)
132 {
133 case WM_INITDIALOG:
135 groupInfo = (PLOCALGROUP_INFO_1)lParam;
137 break;
138
139 case WM_COMMAND:
140 switch (LOWORD(wParam))
141 {
143 if (HIWORD(wParam) == EN_CHANGE)
144 {
146 EnableWindow(GetDlgItem(hwndDlg, IDOK), (nLength > 0));
147 }
148 break;
149
150 case IDOK:
152 {
155 break;
156 }
157
158 /* Get Name */
160
161 /* Get Description */
163
164 EndDialog(hwndDlg, IDOK);
165 break;
166
167 case IDCANCEL:
168 EndDialog(hwndDlg, IDCANCEL);
169 break;
170 }
171 break;
172
173 default:
174 return FALSE;
175 }
176
177 return TRUE;
178}
179
180
181static VOID
183{
186 LV_ITEM lvi;
187 INT iItem;
188 HWND hwndLV;
189
191
194 hwndDlg,
196 (LPARAM)&group) == IDOK)
197 {
199 1,
200 (LPBYTE)&group,
201 NULL);
202 if (status != NERR_Success)
203 {
204 TCHAR szText[256];
205 wsprintf(szText, TEXT("Error: %u"), status);
206 MessageBox(NULL, szText, TEXT("NetUserAdd"), MB_ICONERROR | MB_OK);
207 return;
208 }
209
210 hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
211
212 ZeroMemory(&lvi, sizeof(lvi));
213 lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
214 lvi.pszText = group.lgrpi1_name;
215 lvi.state = 0;
216 lvi.iImage = 0;
217 iItem = ListView_InsertItem(hwndLV, &lvi);
218
219 ListView_SetItemText(hwndLV, iItem, 1,
220 group.lgrpi1_comment);
221 }
222
223 HeapFree(GetProcessHeap(), 0, group.lgrpi1_name);
224 HeapFree(GetProcessHeap(), 0, group.lgrpi1_comment);
225}
226
227
228static VOID
230{
231 INT nItem;
232 HWND hwndLV;
233
234 hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
235 nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
236 if (nItem != -1)
237 {
238 (void)ListView_EditLabel(hwndLV, nItem);
239 }
240}
241
242
243static BOOL
245{
246 TCHAR szGroupName[UNLEN + 1];
247 TCHAR szText[256];
248 INT nItem;
249 HWND hwndLV;
251
252 hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
253 nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
254 if (nItem == -1)
255 return FALSE;
256
257 /* Get the new group name */
259 nItem, 0,
260 szGroupName,
261 UNLEN + 1);
262
263 /* Display a warning message, because the delete operation cannot be reverted */
264 wsprintf(szText, TEXT("Dou you really want to delete the user group \"%s\"?"), szGroupName);
265 if (MessageBox(NULL, szText, TEXT("User Groups"), MB_ICONWARNING | MB_YESNO) == IDNO)
266 return FALSE;
267
268 /* Delete the group */
269 status = NetLocalGroupDel(NULL, szGroupName);
270 if (status != NERR_Success)
271 {
272 TCHAR szText[256];
273 wsprintf(szText, TEXT("Error: %u"), status);
274 MessageBox(NULL, szText, TEXT("NetLocalGroupDel"), MB_ICONERROR | MB_OK);
275 return FALSE;
276 }
277
278 /* Delete the group from the list */
279 (void)ListView_DeleteItem(hwndLV, nItem);
280
281 return TRUE;
282}
283
284
285static VOID
287{
289 HIMAGELIST hImgList;
290 HICON hIcon;
291
292 /* Create the image list */
293 hImgList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 5, 5);
295 ImageList_AddIcon(hImgList, hIcon);
297
299
301
303
305
307}
308
309
310static BOOL
312{
314
315 hwndEdit = ListView_GetEditControl(pnmv->hdr.hwndFrom);
316 if (hwndEdit == NULL)
317 return TRUE;
318
320
321 return FALSE;
322}
323
324
325static BOOL
327{
328 TCHAR szOldGroupName[UNLEN + 1];
329 TCHAR szNewGroupName[UNLEN + 1];
330 LOCALGROUP_INFO_0 lgrpi0;
332
333 /* Leave, if there is no valid listview item */
334 if (pnmv->item.iItem == -1)
335 return FALSE;
336
337 /* Get the new user name */
338 ListView_GetItemText(pnmv->hdr.hwndFrom,
339 pnmv->item.iItem, 0,
340 szOldGroupName,
341 UNLEN + 1);
342
343 /* Leave, if the user canceled the edit action */
344 if (pnmv->item.pszText == NULL)
345 return FALSE;
346
347 /* Get the new user name */
348 lstrcpy(szNewGroupName, pnmv->item.pszText);
349
350 /* Leave, if the user name was not changed */
351 if (lstrcmp(szOldGroupName, szNewGroupName) == 0)
352 return FALSE;
353
354 /* Check the group name for illegal characters */
355 if (!CheckAccountName(NULL, 0, szNewGroupName))
356 return FALSE;
357
358 /* Change the user name */
359 lgrpi0.lgrpi0_name = szNewGroupName;
360
361 status = NetLocalGroupSetInfo(NULL, szOldGroupName, 0, (LPBYTE)&lgrpi0, NULL);
362 if (status != NERR_Success)
363 {
364 TCHAR szText[256];
365 wsprintf(szText, TEXT("Error: %u"), status);
366 MessageBox(NULL, szText, TEXT("NetLocalGroupSetInfo"), MB_ICONERROR | MB_OK);
367 return FALSE;
368 }
369
370 /* Update the listview item */
371 ListView_SetItemText(pnmv->hdr.hwndFrom,
372 pnmv->item.iItem, 0,
373 szNewGroupName);
374
375 return TRUE;
376}
377
378
379static BOOL
380OnGroupsPageNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr)
381{
382 LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr;
383
384 switch (phdr->idFrom)
385 {
386 case IDC_GROUPS_LIST:
387 switch(phdr->code)
388 {
389 case NM_CLICK:
390 pGroupData->iCurrentItem = lpnmlv->iItem;
391 break;
392
393 case NM_DBLCLK:
394 if (lpnmlv->iItem != -1)
395 {
396 UINT uItem;
397
398 uItem = GetMenuDefaultItem(GetSubMenu(pGroupData->hPopupMenu, 1),
399 FALSE, 0);
400 if (uItem != (UINT)-1)
401 SendMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(uItem, 0), 0);
402 }
403 break;
404
405 case NM_RCLICK:
407 TrackPopupMenu(GetSubMenu(pGroupData->hPopupMenu, (lpnmlv->iItem == -1) ? 0 : 1),
408 TPM_LEFTALIGN, lpnmlv->ptAction.x, lpnmlv->ptAction.y, 0, hwndDlg, NULL);
409 break;
410
413
414 case LVN_ENDLABELEDIT:
416 }
417 break;
418 }
419
420 return FALSE;
421}
422
423
426 UINT uMsg,
429{
430 PGROUP_DATA pGroupData;
431
434 UNREFERENCED_PARAMETER(hwndDlg);
435
436
437 pGroupData = (PGROUP_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
438
439 switch (uMsg)
440 {
441 case WM_INITDIALOG:
442 pGroupData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GROUP_DATA));
443 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGroupData);
444
445 pGroupData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_GROUP));
446
447 OnGroupsPageInitDialog(hwndDlg);
448 SetMenuDefaultItem(GetSubMenu(pGroupData->hPopupMenu, 1),
450 FALSE);
451 break;
452
453 case WM_COMMAND:
454 switch (LOWORD(wParam))
455 {
456 case IDM_GROUP_NEW:
457 case IDC_GROUPS_ADD:
458 GroupNew(hwndDlg);
459 break;
460
461 case IDM_GROUP_RENAME:
462 GroupRename(hwndDlg);
463 break;
464
465 case IDM_GROUP_DELETE:
467 GroupDelete(hwndDlg);
468 break;
469
472 if (GroupProperties(hwndDlg) == IDOK)
473 UpdateGroupProperties(hwndDlg);
474 break;
475 }
476 break;
477
478 case WM_NOTIFY:
479 return OnGroupsPageNotify(hwndDlg, pGroupData, (NMHDR *)lParam);
480
481 case WM_DESTROY:
482 DestroyMenu(pGroupData->hPopupMenu);
483 HeapFree(GetProcessHeap(), 0, pGroupData);
484 break;
485 }
486
487 return FALSE;
488}
#define VOID
Definition: acefi.h:82
#define IDS_DESCRIPTION
Definition: resource.h:4
WPARAM wParam
Definition: combotst.c:138
HWND hwndEdit
Definition: combotst.c:65
LPARAM lParam
Definition: combotst.c:139
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
BOOL CheckAccountName(HWND hwndDlg, INT nIdDlgItem, LPTSTR lpAccountName)
Definition: misc.c:13
#define IDC_GROUP_NEW_NAME
Definition: resource.h:79
#define IDM_GROUP_DELETE
Definition: resource.h:99
#define IDM_GROUP_RENAME
Definition: resource.h:100
#define IDC_GROUP_NEW_DESCRIPTION
Definition: resource.h:80
#define IDI_GROUP
Definition: resource.h:8
#define IDM_GROUP_NEW
Definition: resource.h:98
#define IDM_POPUP_GROUP
Definition: resource.h:96
#define IDC_GROUPS_PROPERTIES
Definition: resource.h:40
#define IDS_NAME
Definition: resource.h:90
#define IDC_GROUPS_ADD
Definition: resource.h:38
#define IDC_GROUPS_REMOVE
Definition: resource.h:39
#define IDD_GROUP_NEW
Definition: resource.h:78
#define IDC_GROUPS_LIST
Definition: resource.h:16
#define IDM_GROUP_PROPERTIES
Definition: resource.h:101
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
Definition: apibuf.c:43
HWND hwndListView
Definition: eventvwr.c:66
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLboolean GLuint group
Definition: glext.h:11120
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
BOOL GroupProperties(HWND hwndDlg)
Definition: groupprops.c:597
static BOOL OnGroupsPageBeginLabelEdit(LPNMLVDISPINFO pnmv)
Definition: groups.c:311
static BOOL GroupDelete(HWND hwndDlg)
Definition: groups.c:244
static BOOL OnGroupsPageEndLabelEdit(LPNMLVDISPINFO pnmv)
Definition: groups.c:326
struct _GROUP_DATA * PGROUP_DATA
static BOOL OnGroupsPageNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr)
Definition: groups.c:380
static VOID UpdateGroupsList(HWND hwndListView)
Definition: groups.c:48
static VOID GroupNew(HWND hwndDlg)
Definition: groups.c:182
static VOID UpdateGroupProperties(HWND hwndDlg)
Definition: groups.c:91
static VOID SetGroupsListColumns(HWND hwndListView)
Definition: groups.c:22
static VOID OnGroupsPageInitDialog(HWND hwndDlg)
Definition: groups.c:286
INT_PTR CALLBACK GroupsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groups.c:425
struct _GROUP_DATA GROUP_DATA
INT_PTR CALLBACK NewGroupDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groups.c:119
static VOID GroupRename(HWND hwndDlg)
Definition: groups.c:229
#define TEXT(s)
Definition: k32.h:26
struct _LOCALGROUP_INFO_1 * PLOCALGROUP_INFO_1
#define NERR_Success
Definition: lmerr.h:5
NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, LPDWORD parm_err)
Definition: local_group.c:1732
NET_API_STATUS WINAPI NetLocalGroupEnum(LPCWSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, PDWORD_PTR resumehandle)
Definition: local_group.c:974
NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE *bufptr)
Definition: local_group.c:1225
NET_API_STATUS WINAPI NetLocalGroupAdd(LPCWSTR servername, DWORD level, LPBYTE buf, LPDWORD parm_err)
Definition: local_group.c:334
NET_API_STATUS WINAPI NetLocalGroupDel(LPCWSTR servername, LPCWSTR groupname)
Definition: local_group.c:677
static HICON
Definition: imagelist.c:84
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
HICON hIcon
Definition: msconfig.c:44
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define LOWORD(l)
Definition: pedump.c:82
#define INT
Definition: polytest.cpp:20
#define LVSIL_SMALL
Definition: commctrl.h:2299
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2408
#define ListView_EditLabel(hwndLV, i)
Definition: commctrl.h:2540
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2636
#define NM_DBLCLK
Definition: commctrl.h:131
#define LVIF_STATE
Definition: commctrl.h:2312
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2304
#define ListView_GetEditControl(hwndLV)
Definition: commctrl.h:2543
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
Definition: commctrl.h:2684
#define LVN_ENDLABELEDIT
Definition: commctrl.h:3159
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define ILC_COLOR32
Definition: commctrl.h:358
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
#define NM_CLICK
Definition: commctrl.h:130
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
#define LVN_BEGINLABELEDIT
Definition: commctrl.h:3158
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2725
#define LV_ITEM
Definition: commctrl.h:2337
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
Definition: commctrl.h:2691
#define LVIF_TEXT
Definition: commctrl.h:2309
#define LVCF_FMT
Definition: commctrl.h:2586
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
#define NM_RCLICK
Definition: commctrl.h:133
#define LVCF_SUBITEM
Definition: commctrl.h:2589
#define LVCFMT_LEFT
Definition: commctrl.h:2598
#define ILC_MASK
Definition: commctrl.h:351
#define ListView_DeleteItem(hwnd, i)
Definition: commctrl.h:2411
#define LVIF_IMAGE
Definition: commctrl.h:2310
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LV_COLUMN
Definition: commctrl.h:2547
PVOID pBuffer
#define LPNMLVDISPINFO
Definition: commctrl.h:77
#define WM_NOTIFY
Definition: richedit.h:61
#define memset(x, y, z)
Definition: compat.h:39
#define UNLEN
Definition: sspi.c:28
& rect
Definition: startmenu.cpp:1413
INT iCurrentItem
Definition: groups.c:16
HMENU hPopupMenu
Definition: groups.c:14
LPWSTR lgrpi0_name
Definition: lmaccess.h:506
LPWSTR lgrpi1_comment
Definition: lmaccess.h:510
LPWSTR lgrpi1_name
Definition: lmaccess.h:509
Definition: ps.c:97
UINT_PTR idFrom
Definition: winuser.h:3158
UINT code
Definition: winuser.h:3159
POINT ptAction
Definition: commctrl.h:3039
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
LPTSTR GetDlgItemTextAlloc(HWND hwndDlg, INT nDlgItem)
Definition: usrmgr.c:19
#define ZeroMemory
Definition: winbase.h:1712
#define lstrcmp
Definition: winbase.h:3872
#define lstrcpy
Definition: winbase.h:3874
_In_ DWORD nLength
Definition: wincon.h:473
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define MAKEWPARAM(l, h)
Definition: winuser.h:4009
#define WM_GETTEXTLENGTH
Definition: winuser.h:1619
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
#define DWLP_USER
Definition: winuser.h:872
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define IDCANCEL
Definition: winuser.h:831
#define IMAGE_ICON
Definition: winuser.h:212
#define WM_COMMAND
Definition: winuser.h:1740
#define DialogBoxParam
Definition: winuser.h:5764
#define WM_INITDIALOG
Definition: winuser.h:1739
#define MB_YESNO
Definition: winuser.h:817
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:830
#define MB_ICONERROR
Definition: winuser.h:787
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
#define EM_SETLIMITTEXT
Definition: winuser.h:2011
#define TPM_LEFTALIGN
Definition: winuser.h:2377
#define IDNO
Definition: winuser.h:836
#define SendMessage
Definition: winuser.h:5843
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define EM_SETSEL
Definition: winuser.h:2018
#define LoadMenu
Definition: winuser.h:5817
#define MB_OK
Definition: winuser.h:790
#define wsprintf
Definition: winuser.h:5865
#define MB_ICONWARNING
Definition: winuser.h:786
#define LoadImage
Definition: winuser.h:5815
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define LoadString
Definition: winuser.h:5819
#define MessageBox
Definition: winuser.h:5822
#define LR_DEFAULTCOLOR
Definition: winuser.h:1087
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define WM_DESTROY
Definition: winuser.h:1609
#define SendDlgItemMessage
Definition: winuser.h:5842
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2053
#define EN_CHANGE
Definition: winuser.h:2022
char TCHAR
Definition: xmlstorage.h:189