ReactOS 0.4.16-dev-197-g92996da
dialog.c
Go to the documentation of this file.
1/*
2 * Program Manager
3 *
4 * Copyright 1996 Ulrich Schmid
5 * Copyright 2002 Sylvain Petreolle
6 * Copyright 2002 Andriy Palamarchuk
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23/*
24 * PROJECT: ReactOS Program Manager
25 * COPYRIGHT: GPL - See COPYING in the top level directory
26 * FILE: base/shell/progman/dialog.c
27 * PURPOSE: ProgMan dialog boxes
28 * PROGRAMMERS: Ulrich Schmid
29 * Sylvain Petreolle
30 * Andriy Palamarchuk
31 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
32 */
33
34#include "progman.h"
35
36#include <commdlg.h>
37
38/***********************************************************************
39 *
40 * DIALOG_AddFilterItem and DIALOG_BrowseXXX
41 */
42
43static
44VOID
46{
48 *p += wcslen(*p) + 1;
49 lstrcpyW(*p, filter);
50 *p += wcslen(*p) + 1;
51 **p = '\0';
52}
53
54static
55BOOL
56DIALOG_Browse(HWND hWnd, LPCWSTR lpszzFilter, LPWSTR lpstrFile, INT nMaxFile)
57{
58 OPENFILENAMEW openfilename;
59 WCHAR szDir[MAX_PATH];
60
61 ZeroMemory(&openfilename, sizeof(openfilename));
62
63 GetCurrentDirectoryW(ARRAYSIZE(szDir), szDir);
64
65 openfilename.lStructSize = sizeof(openfilename);
66 openfilename.hwndOwner = hWnd;
67 openfilename.hInstance = Globals.hInstance;
68 openfilename.lpstrFilter = lpszzFilter;
69 openfilename.lpstrFile = lpstrFile;
70 openfilename.nMaxFile = nMaxFile;
71 openfilename.lpstrInitialDir = szDir;
72 openfilename.Flags = OFN_EXPLORER;
73 openfilename.lpstrDefExt = L"exe";
74 openfilename.lpstrCustomFilter = NULL;
75 openfilename.nMaxCustFilter = 0;
76 openfilename.nFilterIndex = 0;
77 openfilename.lpstrFileTitle = NULL;
78 openfilename.nMaxFileTitle = 0;
79 openfilename.lpstrTitle = NULL;
80 openfilename.nFileOffset = 0;
81 openfilename.nFileExtension = 0;
82 openfilename.lCustData = 0;
83 openfilename.lpfnHook = NULL;
84 openfilename.lpTemplateName = NULL;
85
86 return GetOpenFileNameW(&openfilename);
87}
88
89static
90BOOL
92{
93 WCHAR szzFilter[2 * MAX_STRING_LEN + 100];
94 LPWSTR p = szzFilter;
95
96 DIALOG_AddFilterItem(&p, IDS_PROGRAMS , L"*.exe;*.pif;*.com;*.bat;*.cmd");
98
99 return DIALOG_Browse(hWnd, szzFilter, lpszFile, nMaxFile);
100}
101
102static
103BOOL
105{
106 WCHAR szzFilter[5 * MAX_STRING_LEN + 100];
107 LPWSTR p = szzFilter;
108
109 DIALOG_AddFilterItem(&p, IDS_SYMBOL_FILES, L"*.ico;*.exe;*.dll");
114
115 return DIALOG_Browse(hWnd, szzFilter, lpszFile, nMaxFile);
116}
117
118
119
120/***********************************************************************
121 *
122 * DIALOG_New
123 */
124
126{
127 static const LPCWSTR FormatNames[] =
128 {
129 L"Windows 3.1",
130 L"NT Ansi",
131 L"NT Unicode"
132 };
133
134 if (Format > NT_Unicode)
135 return NULL;
136 else
137 return FormatNames[Format];
138}
139
140typedef struct _NEW_ITEM_CONTEXT
141{
145
146static
150{
151 PNEW_ITEM_CONTEXT pNewItem;
153 INT iItem;
154
155 pNewItem = (PNEW_ITEM_CONTEXT)GetWindowLongPtrW(hDlg, 8);
156
157 switch (uMsg)
158 {
159 case WM_INITDIALOG:
160 {
161 pNewItem = (PNEW_ITEM_CONTEXT)lParam;
162 SetWindowLongPtrW(hDlg, 8, lParam);
163
164 for (format = Win_311; format <= NT_Unicode; ++format)
165 {
167 if (iItem != CB_ERR && iItem != CB_ERRSPACE)
169 }
170
174
176
177 SendMessageW(hDlg, WM_COMMAND, pNewItem->nDefault, 0);
178 break;
179 }
180
181 case WM_COMMAND:
182 switch (LOWORD(wParam))
183 {
184 case PM_NEW_GROUP:
185 {
191 return TRUE;
192 }
193
194 case PM_NEW_PROGRAM:
195 {
201 return TRUE;
202 }
203
204 case IDHELP:
206 return TRUE;
207
208 case IDOK:
209 {
210 iItem = SendDlgItemMessageW(hDlg, PM_FORMAT, CB_GETCURSEL, 0, 0);
211
214
215 pNewItem->nResult = !!IsDlgButtonChecked(hDlg, PM_NEW_GROUP);
216 pNewItem->nResult |= (!!IsDlgButtonChecked(hDlg, PM_COMMON_GROUP) << 1);
217 pNewItem->nResult |= (format << 2);
218
219 EndDialog(hDlg, IDOK);
220 return TRUE;
221 }
222
223 case IDCANCEL:
224 EndDialog(hDlg, IDCANCEL);
225 return TRUE;
226 }
227 return FALSE;
228 }
229
230 return FALSE;
231}
232
233BOOL DIALOG_New(INT nDefault, PINT pnResult)
234{
235 INT_PTR ret;
236 NEW_ITEM_CONTEXT NewItem;
237
238 *pnResult = 0;
239
240 NewItem.nDefault = nDefault;
241 NewItem.nResult = 0;
243 if (ret == IDOK)
244 *pnResult = NewItem.nResult;
245
246 return (ret == IDOK);
247}
248
249
250/***********************************************************************
251 *
252 * DIALOG_CopyMove
253 */
254
255typedef struct _COPY_MOVE_CONTEXT
256{
261
262static
266{
267 PROGGROUP* hGrpItem;
268 PROGGROUP* hGroup;
269
270 PCOPY_MOVE_CONTEXT pCopyMove;
271 INT iItem;
272
274
275 pCopyMove = (PCOPY_MOVE_CONTEXT)GetWindowLongPtrW(hDlg, 8);
276
277 switch (uMsg)
278 {
279 case WM_INITDIALOG:
280 {
281 pCopyMove = (PCOPY_MOVE_CONTEXT)lParam;
282 SetWindowLongPtrW(hDlg, 8, lParam);
283
284 if (pCopyMove->bMove)
285 {
287 SetWindowTextW(hDlg, text);
290 }
291
292 /* List all the group names but the source group, in case we are doing a move */
293 for (hGroup = Globals.hGroups; hGroup; hGroup = hGroup->hNext)
294 {
295 if (!pCopyMove->bMove || hGroup != pCopyMove->Program->hGroup)
296 {
297 iItem = SendDlgItemMessageW(hDlg, PM_TO_GROUP, CB_ADDSTRING, 0, (LPARAM)hGroup->hName);
298 if (iItem != CB_ERR && iItem != CB_ERRSPACE)
300 }
301 }
303 SetDlgItemTextW(hDlg, PM_PROGRAM , pCopyMove->Program->hName);
304 SetDlgItemTextW(hDlg, PM_FROM_GROUP, pCopyMove->Program->hGroup->hName);
305 break;
306 }
307
308 case WM_COMMAND:
309 switch (LOWORD(wParam))
310 {
311 case IDHELP:
313 return TRUE;
314
315 case IDOK:
316 {
317 /* Get the selected group */
318 iItem = SendDlgItemMessageW(hDlg, PM_TO_GROUP, CB_GETCURSEL, 0, 0);
319 hGrpItem = (PROGGROUP *)SendDlgItemMessageW(hDlg, PM_TO_GROUP, CB_GETITEMDATA, iItem, 0);
320 /* Check that it is indeed in the group list */
321 for (hGroup = Globals.hGroups; hGroup && hGroup != hGrpItem; hGroup = hGroup->hNext)
322 ;
323 if (pCopyMove->bMove)
324 {
325 if (hGrpItem == pCopyMove->Program->hGroup)
326 hGrpItem = NULL;
327 }
328 pCopyMove->hToGroup = hGrpItem;
329 EndDialog(hDlg, IDOK);
330 return TRUE;
331 }
332
333 case IDCANCEL:
334 EndDialog(hDlg, IDCANCEL);
335 return TRUE;
336 }
337 return FALSE;
338 }
339
340 return FALSE;
341}
342
344{
345 COPY_MOVE_CONTEXT CopyMove;
346 INT_PTR ret;
347
348 CopyMove.bMove = bMove;
349 CopyMove.Program = hProgram;
350 CopyMove.hToGroup = NULL;
352
353 return (ret == IDOK ? CopyMove.hToGroup : NULL);
354}
355
356/***********************************************************************
357 *
358 * DIALOG_Delete
359 */
360
361BOOL DIALOG_Delete(UINT ids_text_s, LPCWSTR lpszName)
362{
363 return (MAIN_MessageBoxIDS_s(ids_text_s, lpszName, IDS_DELETE, MB_YESNO | MB_DEFBUTTON2) == IDYES);
364}
365
366
367/* Adapted from dll/win32/shell32/dialogs/dialogs.cpp!EnableOkButtonFromEditContents */
369{
370 BOOL Enable = FALSE;
371 LPWSTR psz;
372 INT Length, n;
373 HWND Edit;
374
375 Edit = GetDlgItem(hDlg, nIDEditItem);
377
378 if (Length <= 0)
379 return FALSE;
380
381 psz = Alloc(0, (Length + 1) * sizeof(WCHAR));
382 if (psz)
383 {
384 GetWindowTextW(Edit, psz, Length + 1);
385 for (n = 0; n < Length && !Enable; ++n)
386 Enable = (psz[n] != ' ');
387 Free(psz);
388 }
389 else
390 {
391 Enable = TRUE;
392 }
393
394 return Enable;
395}
396
397
398/***********************************************************************
399 *
400 * DIALOG_GroupAttributes
401 */
402
404{
410
411static
415{
416 PGROUP_ATTRIBUTES_CONTEXT pGroupAttributes;
417
418 pGroupAttributes = (PGROUP_ATTRIBUTES_CONTEXT)GetWindowLongPtrW(hDlg, 8);
419
420 switch (uMsg)
421 {
422 case WM_INITDIALOG:
423 {
424 DWORD evMask;
425
426 pGroupAttributes = (PGROUP_ATTRIBUTES_CONTEXT)lParam;
427 SetWindowLongPtrW(hDlg, 8, lParam);
428
429 /* Configure Richedit control for sending notification changes */
432
433 SetDlgItemTextW(hDlg, PM_DESCRIPTION, pGroupAttributes->lpszTitle);
434
435 if (pGroupAttributes->format != Win_311)
436 {
438 }
439 else
440 {
441 EnableDlgItem(hDlg, PM_FILE, TRUE);
442 SetDlgItemTextW(hDlg, PM_FILE, pGroupAttributes->lpszGrpFile);
443 }
444
446 break;
447 }
448
449 case WM_COMMAND:
450 switch (LOWORD(wParam))
451 {
452 case IDHELP:
454 return TRUE;
455
456 case PM_DESCRIPTION:
457 {
458 if (HIWORD(wParam) == EN_CHANGE)
460 return FALSE;
461 }
462
463 case IDOK:
464 {
465 GetDlgItemTextW(hDlg, PM_DESCRIPTION, pGroupAttributes->lpszTitle, pGroupAttributes->nSize);
466 if (pGroupAttributes->format)
467 *pGroupAttributes->lpszGrpFile = '\0';
468 else
469 GetDlgItemTextW(hDlg, PM_FILE, pGroupAttributes->lpszGrpFile, pGroupAttributes->nSize);
470 EndDialog(hDlg, IDOK);
471 return TRUE;
472 }
473
474 case IDCANCEL:
475 EndDialog(hDlg, IDCANCEL);
476 return TRUE;
477 }
478 return FALSE;
479 }
480
481 return FALSE;
482}
483
485{
486 INT_PTR ret;
487 GROUP_ATTRIBUTES_CONTEXT GroupAttributes;
488
489 GroupAttributes.format = format;
490 GroupAttributes.nSize = nSize;
491 GroupAttributes.lpszTitle = lpszTitle;
492 GroupAttributes.lpszGrpFile = lpszGrpFile;
493
495
496 return (ret == IDOK);
497}
498
499
500/***********************************************************************
501 *
502 * DIALOG_Symbol
503 */
504
505/* Adapted from dll/win32/shell32/dialogs/dialogs.cpp!EnumPickIconResourceProc */
506static
507BOOL
510{
511 HICON hIcon;
512 HWND hDlgCtrl = (HWND)lParam;
513 WCHAR szName[100];
514
515 if (IS_INTRESOURCE(lpszName))
516 StringCbPrintfW(szName, sizeof(szName), L"%u", (unsigned)(UINT_PTR)lpszName);
517 else
518 StringCbCopyW(szName, sizeof(szName), lpszName);
519
520 hIcon = (HICON)LoadImageW(hModule, lpszName, IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
521 if (hIcon == NULL)
522 return TRUE;
523
524 SendMessageW(hDlgCtrl, LB_ADDSTRING, 0, (LPARAM)hIcon);
525 return TRUE;
526}
527
528static
529VOID
531{
532 HICON hIcon;
533 UINT count;
534
535 count = SendMessageA(hDlgCtrl, LB_GETCOUNT, 0, 0);
536 if (count == LB_ERR || count == 0)
537 return;
538
539 while (count-- > 0)
540 {
541 hIcon = (HICON)SendMessageA(hDlgCtrl, LB_GETITEMDATA, 0, 0);
543 SendMessageA(hDlgCtrl, LB_DELETESTRING, 0, 0);
544 }
545}
546
547typedef struct _PICK_ICON_CONTEXT
548{
551 WCHAR szName[MAX_PATH]; // LPWSTR lpszIconFile; // INT nSize;
555
556#if 0
557
558static struct
559{
560 LPSTR lpszIconFile;
561 INT nSize;
562 HICON *lphIcon;
563 INT *lpnIconIndex;
564} Symbol;
565
566#endif
567
568static
572{
574 PPICK_ICON_CONTEXT pIconContext;
575
576 pIconContext = (PPICK_ICON_CONTEXT)GetWindowLongPtrW(hDlg, 8);
577
578 switch (uMsg)
579 {
580 case WM_INITDIALOG:
581 {
582 pIconContext = (PPICK_ICON_CONTEXT)lParam;
583 SetWindowLongPtrW(hDlg, 8, lParam);
584
585 pIconContext->hDlgCtrl = GetDlgItem(hDlg, PM_SYMBOL_LIST);
586 SetDlgItemTextW(hDlg, PM_ICON_FILE, pIconContext->szName);
587 SendMessageA(pIconContext->hDlgCtrl, LB_SETITEMHEIGHT, 0, 32);
588
589 pIconContext->hLibrary = LoadLibraryExW(pIconContext->szName, NULL, /* NT6+: LOAD_LIBRARY_AS_IMAGE_RESOURCE | */ LOAD_LIBRARY_AS_DATAFILE);
590 if (pIconContext->hLibrary)
591 {
592 EnumResourceNamesW(pIconContext->hLibrary,
595 (LONG_PTR)pIconContext->hDlgCtrl);
596 FreeLibrary(pIconContext->hLibrary);
597 pIconContext->hLibrary = NULL;
598 }
599 SendMessageA(pIconContext->hDlgCtrl, LB_SETCURSEL, pIconContext->Index, 0);
600 return TRUE;
601 }
602
603 case WM_MEASUREITEM:
604 {
606 measure->itemWidth = 32;
607 measure->itemHeight = 32;
608 return TRUE;
609 }
610
611 case WM_DRAWITEM:
612 {
614
615 if (dis->itemState & ODS_SELECTED)
616 FillRect(dis->hDC, &dis->rcItem, (HBRUSH)(COLOR_HIGHLIGHT + 1));
617 else
618 FillRect(dis->hDC, &dis->rcItem, (HBRUSH)(COLOR_WINDOW + 1));
619
620 DrawIcon(dis->hDC, dis->rcItem.left, dis->rcItem.top, (HICON)dis->itemData);
621 return TRUE;
622 }
623
624 case WM_COMMAND:
625 switch (LOWORD(wParam))
626 {
627 case PM_BROWSE:
628 {
629 filename[0] = '\0';
631 return TRUE;
632
633 if (_wcsnicmp(pIconContext->szName, filename, ARRAYSIZE(pIconContext->szName)) == 0)
634 return TRUE;
635
637 DestroyIconList(pIconContext->hDlgCtrl);
638 pIconContext->hLibrary = LoadLibraryExW(filename, NULL, /* NT6+: LOAD_LIBRARY_AS_IMAGE_RESOURCE | */ LOAD_LIBRARY_AS_DATAFILE);
639 if (pIconContext->hLibrary)
640 {
641 EnumResourceNamesW(pIconContext->hLibrary,
644 (LONG_PTR)pIconContext->hDlgCtrl);
645 FreeLibrary(pIconContext->hLibrary);
646 pIconContext->hLibrary = NULL;
647 }
648 SendMessageA(pIconContext->hDlgCtrl, LB_SETCURSEL, 0, 0);
649 return TRUE;
650 }
651
652 case IDHELP:
654 return TRUE;
655
656 case IDOK:
657 {
658 INT nCurSel = SendMessageW(pIconContext->hDlgCtrl, LB_GETCURSEL, 0, 0);
659 GetDlgItemTextW(hDlg, PM_ICON_FILE, pIconContext->szName, ARRAYSIZE(pIconContext->szName));
660 pIconContext->hIcon = (HICON)SendMessageA(pIconContext->hDlgCtrl, LB_GETITEMDATA, nCurSel, 0);
661 pIconContext->hIcon = CopyIcon(pIconContext->hIcon);
662 DestroyIconList(pIconContext->hDlgCtrl);
663 EndDialog(hDlg, IDOK);
664 return TRUE;
665 }
666
667 case IDCANCEL:
668 DestroyIconList(pIconContext->hDlgCtrl);
669 EndDialog(hDlg, IDCANCEL);
670 return TRUE;
671 }
672 return FALSE;
673 }
674
675 return FALSE;
676}
677
678static
679VOID
680DIALOG_Symbol(HWND hWnd, HICON *lphIcon, LPWSTR lpszIconFile, INT *lpnIconIndex, INT nSize)
681{
682 PICK_ICON_CONTEXT IconContext;
683
684 IconContext.Index = *lpnIconIndex;
685 StringCchCopyNW(IconContext.szName, ARRAYSIZE(IconContext.szName), lpszIconFile, nSize);
686
688 return;
689
690 StringCchCopyNW(lpszIconFile, nSize, IconContext.szName, ARRAYSIZE(IconContext.szName));
691 *lpnIconIndex = IconContext.Index;
692 *lphIcon = IconContext.hIcon;
693}
694
695
696/***********************************************************************
697 *
698 * DIALOG_ProgramAttributes
699 */
700
702{
711 // HWND hSelGroupWnd;
712 BOOL* lpbNewVDM; // unused!
719
720static
724{
727 DWORD evMask;
728 DWORD dwBinaryType;
729 PPROGRAM_ATTRIBUTES_CONTEXT pProgramAttributes;
730
731 pProgramAttributes = (PPROGRAM_ATTRIBUTES_CONTEXT)GetWindowLongPtrW(hDlg, 8);
732
733 switch (uMsg)
734 {
735 case WM_INITDIALOG:
736 {
737 pProgramAttributes = (PPROGRAM_ATTRIBUTES_CONTEXT)lParam;
738 SetWindowLongPtrW(hDlg, 8, lParam);
739
742
743 SetDlgItemTextW(hDlg, PM_DESCRIPTION , pProgramAttributes->lpszTitle);
744 SetDlgItemTextW(hDlg, PM_COMMAND_LINE, pProgramAttributes->lpszCmdLine);
745 SetDlgItemTextW(hDlg, PM_DIRECTORY , pProgramAttributes->lpszWorkDir);
746
747 /* 0x0F 0x06 */
749 SendDlgItemMessageW(hDlg, PM_HOT_KEY, HKM_SETHOTKEY, *pProgramAttributes->lpnHotKey, 0);
750
754
755 CheckDlgButton(hDlg, PM_SYMBOL, *pProgramAttributes->lpnCmdShow == SW_SHOWMINNOACTIVE);
756
757 if (pProgramAttributes->bCheckBinaryType &&
758 (!GetBinaryTypeW(pProgramAttributes->lpszCmdLine, &dwBinaryType) || dwBinaryType != SCS_WOW_BINARY) )
759 {
762 }
763 else
764 {
766 CheckDlgButton(hDlg, PM_NEW_VDM, *pProgramAttributes->lpbNewVDM);
767 }
768 SendDlgItemMessageW(hDlg, PM_ICON, STM_SETICON, (WPARAM)pProgramAttributes->hTmpIcon, 0);
769 break;
770 }
771
772 case WM_COMMAND:
773 switch (LOWORD(wParam))
774 {
775 case PM_NEW_VDM:
777 return TRUE;
778
779 case PM_BROWSE:
780 {
781 filename[0] = '\0';
783 {
785 if (pProgramAttributes->bCheckBinaryType &&
786 (!GetBinaryTypeW(filename, &dwBinaryType) || dwBinaryType != SCS_WOW_BINARY))
787 {
790 }
791 else
792 {
795 }
796 }
797 return TRUE;
798 }
799
800 case IDHELP:
802 return TRUE;
803
804 case PM_SYMBOL:
806 return TRUE;
807
808 case PM_OTHER_SYMBOL:
809 {
810 DIALOG_Symbol(hDlg,
811 &pProgramAttributes->hTmpIcon,
812 pProgramAttributes->lpszTmpIconFile,
813 &pProgramAttributes->nTmpIconIndex,
815
816 SendDlgItemMessageW(hDlg, PM_ICON, STM_SETICON, (WPARAM)pProgramAttributes->hTmpIcon, 0);
817 return TRUE;
818 }
819
820 case PM_COMMAND_LINE:
821 {
822 if (HIWORD(wParam) == EN_CHANGE)
823 {
827 }
828 return FALSE;
829 }
830
831 case IDOK:
832 {
833 GetDlgItemTextW(hDlg, PM_DESCRIPTION , pProgramAttributes->lpszTitle , pProgramAttributes->nSize);
834 GetDlgItemTextW(hDlg, PM_COMMAND_LINE, pProgramAttributes->lpszCmdLine, pProgramAttributes->nSize);
835 GetDlgItemTextW(hDlg, PM_DIRECTORY , pProgramAttributes->lpszWorkDir, pProgramAttributes->nSize);
836 if (pProgramAttributes->hTmpIcon)
837 {
838#if 0
839 if (*pProgramAttributes->lphIcon)
840 DestroyIcon(*pProgramAttributes->lphIcon);
841#endif
842 *pProgramAttributes->lphIcon = pProgramAttributes->hTmpIcon;
843 *pProgramAttributes->lpnIconIndex = pProgramAttributes->nTmpIconIndex;
844 lstrcpynW(pProgramAttributes->lpszIconFile, pProgramAttributes->lpszTmpIconFile, pProgramAttributes->nSize);
845 }
846 *pProgramAttributes->lpnHotKey = SendDlgItemMessageW(hDlg, PM_HOT_KEY, HKM_GETHOTKEY, 0, 0);
848 *pProgramAttributes->lpbNewVDM = IsDlgButtonChecked(hDlg, PM_NEW_VDM);
849 EndDialog(hDlg, IDOK);
850 return TRUE;
851 }
852
853 case IDCANCEL:
854 EndDialog(hDlg, IDCANCEL);
855 return TRUE;
856 }
857 return FALSE;
858 }
859
860 return FALSE;
861}
862
863BOOL
864DIALOG_ProgramAttributes(LPWSTR lpszTitle, LPWSTR lpszCmdLine, LPWSTR lpszWorkDir, LPWSTR lpszIconFile,
865 HICON* lphIcon, INT* lpnIconIndex, INT* lpnHotKey, INT* lpnCmdShow, BOOL* lpbNewVDM, INT nSize)
866{
867 INT_PTR ret;
868 WCHAR szTmpIconFile[MAX_PATHNAME_LEN];
869 PROGRAM_ATTRIBUTES_CONTEXT ProgramAttributes;
871 DWORD dwType;
872
873 ProgramAttributes.nSize = nSize;
874 ProgramAttributes.lpszTitle = lpszTitle;
875 ProgramAttributes.lpszCmdLine = lpszCmdLine;
876 ProgramAttributes.lpszWorkDir = lpszWorkDir;
877 ProgramAttributes.lpszIconFile = lpszIconFile;
878 ProgramAttributes.lpnCmdShow = lpnCmdShow;
879 ProgramAttributes.lpnHotKey = lpnHotKey;
880 ProgramAttributes.lpbNewVDM = lpbNewVDM;
881 ProgramAttributes.lphIcon = lphIcon;
882 ProgramAttributes.lpnIconIndex = lpnIconIndex;
883
884 dwSize = sizeof(ProgramAttributes.bCheckBinaryType);
885 if (RegQueryValueExW(Globals.hKeyPMSettings,
886 L"CheckBinaryType",
887 0,
888 &dwType,
889 (LPBYTE)&ProgramAttributes.bCheckBinaryType,
891 || dwType != REG_DWORD)
892 {
893 ProgramAttributes.bCheckBinaryType = TRUE;
894 }
895
896#if 0
897 ProgramAttributes.hTmpIcon = NULL;
898#else
899 ProgramAttributes.hTmpIcon = *lphIcon;
900#endif
901 ProgramAttributes.nTmpIconIndex = *lpnIconIndex;
902 ProgramAttributes.lpszTmpIconFile = szTmpIconFile;
903 wcsncpy(szTmpIconFile, lpszIconFile, ARRAYSIZE(szTmpIconFile));
904
906 return (ret == IDOK);
907}
908
909
910/***********************************************************************
911 *
912 * DIALOG_Execute
913 */
914
915typedef struct _EXECUTE_CONTEXT
916{
921
922static
926{
927 WCHAR szFile[MAX_PATHNAME_LEN]; // filename
928 DWORD BinaryType;
929 PEXECUTE_CONTEXT pExecuteContext;
930
931 pExecuteContext = (PEXECUTE_CONTEXT)GetWindowLongPtrW(hDlg, 8);
932
933 switch (uMsg)
934 {
935 case WM_INITDIALOG:
936 {
937 pExecuteContext = (PEXECUTE_CONTEXT)lParam;
938 SetWindowLongPtrW(hDlg, 8, lParam);
939
941
942 if (pExecuteContext->bCheckBinaryType)
943 {
946 }
947 else
948 {
950 }
951
952 break;
953 }
954
955 case WM_COMMAND:
956 switch (LOWORD(wParam))
957 {
958 case PM_SYMBOL:
960 return TRUE;
961
962 case PM_NEW_VDM:
964 return TRUE;
965
966 case PM_BROWSE:
967 {
968 szFile[0] = '\0';
969 if (DIALOG_BrowsePrograms(hDlg, szFile, ARRAYSIZE(szFile)))
970 {
971 SetWindowTextW(GetDlgItem(hDlg, PM_COMMAND), szFile);
972 SetFocus(GetDlgItem(hDlg, IDOK));
973 if (pExecuteContext->bCheckBinaryType &&
974 (!GetBinaryTypeW(szFile, &BinaryType) || BinaryType != SCS_WOW_BINARY) )
975 {
978 }
979 else
980 {
983 }
984 }
985 return TRUE;
986 }
987
988 case PM_COMMAND:
989 {
991 {
993 }
994 return FALSE;
995 }
996
997 case IDHELP:
999 return TRUE;
1000
1001 case IDOK:
1002 {
1003 GetDlgItemTextW(hDlg, PM_COMMAND, szFile, ARRAYSIZE(szFile));
1005 if (Globals.bMinOnRun)
1007 EndDialog(hDlg, IDOK);
1008 return TRUE;
1009 }
1010
1011 case IDCANCEL:
1012 EndDialog(hDlg, IDCANCEL);
1013 return TRUE;
1014 }
1015 return FALSE;
1016 }
1017
1018 return FALSE;
1019}
1020
1022{
1023 EXECUTE_CONTEXT ExecuteContext;
1024 LONG lRet;
1025 DWORD dwSize;
1026 DWORD dwType;
1027
1028 ExecuteContext.hKeyPMRecentFilesList = NULL;
1029 ExecuteContext.bCheckBinaryType = TRUE;
1030
1031 lRet = RegCreateKeyExW(Globals.hKeyProgMan,
1032 L"Recent File List",
1033 0,
1034 NULL,
1035 0,
1037 NULL,
1038 &ExecuteContext.hKeyPMRecentFilesList,
1039 NULL);
1040 if (lRet == ERROR_SUCCESS)
1041 {
1042 dwSize = sizeof(ExecuteContext.dwMaxFiles);
1043 lRet = RegQueryValueExW(ExecuteContext.hKeyPMRecentFilesList,
1044 L"Max Files",
1045 NULL,
1046 &dwType,
1047 (LPBYTE)&ExecuteContext.dwMaxFiles,
1048 &dwSize);
1049 if (lRet != ERROR_SUCCESS || dwType != REG_DWORD)
1050 {
1051 ExecuteContext.dwMaxFiles = 4;
1052 dwSize = sizeof(ExecuteContext.dwMaxFiles);
1053 lRet = RegSetValueExW(ExecuteContext.hKeyPMRecentFilesList,
1054 L"Max Files",
1055 0,
1056 REG_DWORD,
1057 (LPBYTE)&ExecuteContext.dwMaxFiles,
1058 sizeof(ExecuteContext.dwMaxFiles));
1059 }
1060
1061 dwSize = sizeof(ExecuteContext.bCheckBinaryType);
1062 lRet = RegQueryValueExW(Globals.hKeyPMSettings,
1063 L"CheckBinaryType",
1064 NULL,
1065 &dwType,
1066 (LPBYTE)&ExecuteContext.bCheckBinaryType,
1067 &dwSize);
1068 if (lRet != ERROR_SUCCESS || dwType != REG_DWORD)
1069 {
1070 ExecuteContext.bCheckBinaryType = TRUE;
1071 }
1072 }
1073
1075
1076 if (ExecuteContext.hKeyPMRecentFilesList)
1077 RegCloseKey(ExecuteContext.hKeyPMRecentFilesList);
1078}
#define IDS_DELETE
Definition: resource.h:40
HWND hWnd
Definition: settings.c:17
#define MAX_STRING_LEN
Definition: precomp.h:36
#define IDS_ERROR
Definition: resource.h:18
BOOL DIALOG_Delete(UINT ids_text_s, LPCWSTR lpszName)
Definition: dialog.c:361
static INT_PTR CALLBACK DIALOG_COPY_MOVE_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:265
static BOOL CALLBACK EnumPickIconResourceProc(HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LONG_PTR lParam)
Definition: dialog.c:509
BOOL DIALOG_New(INT nDefault, PINT pnResult)
Definition: dialog.c:233
static INT_PTR CALLBACK DIALOG_EXECUTE_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:925
BOOL DIALOG_ProgramAttributes(LPWSTR lpszTitle, LPWSTR lpszCmdLine, LPWSTR lpszWorkDir, LPWSTR lpszIconFile, HICON *lphIcon, INT *lpnIconIndex, INT *lpnHotKey, INT *lpnCmdShow, BOOL *lpbNewVDM, INT nSize)
Definition: dialog.c:864
static BOOL DIALOG_Browse(HWND hWnd, LPCWSTR lpszzFilter, LPWSTR lpstrFile, INT nMaxFile)
Definition: dialog.c:56
PROGGROUP * DIALOG_CopyMove(PROGRAM *hProgram, BOOL bMove)
Definition: dialog.c:343
static VOID DestroyIconList(HWND hDlgCtrl)
Definition: dialog.c:530
struct _PROGRAM_ATTRIBUTES_CONTEXT * PPROGRAM_ATTRIBUTES_CONTEXT
BOOL ValidateEditContents(HWND hDlg, INT nIDEditItem)
Definition: dialog.c:368
struct _COPY_MOVE_CONTEXT COPY_MOVE_CONTEXT
VOID DIALOG_Execute(VOID)
Definition: dialog.c:1021
struct _PICK_ICON_CONTEXT PICK_ICON_CONTEXT
static INT_PTR CALLBACK DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:571
static INT_PTR CALLBACK DIALOG_PROGRAM_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:723
struct _NEW_ITEM_CONTEXT NEW_ITEM_CONTEXT
BOOL DIALOG_GroupAttributes(GROUPFORMAT format, LPWSTR lpszTitle, LPWSTR lpszGrpFile, INT nSize)
Definition: dialog.c:484
static VOID DIALOG_Symbol(HWND hWnd, HICON *lphIcon, LPWSTR lpszIconFile, INT *lpnIconIndex, INT nSize)
Definition: dialog.c:680
struct _PROGRAM_ATTRIBUTES_CONTEXT PROGRAM_ATTRIBUTES_CONTEXT
struct _COPY_MOVE_CONTEXT * PCOPY_MOVE_CONTEXT
struct _EXECUTE_CONTEXT EXECUTE_CONTEXT
struct _PICK_ICON_CONTEXT * PPICK_ICON_CONTEXT
static BOOL DIALOG_BrowseSymbols(HWND hWnd, LPWSTR lpszFile, INT nMaxFile)
Definition: dialog.c:104
static BOOL DIALOG_BrowsePrograms(HWND hWnd, LPWSTR lpszFile, INT nMaxFile)
Definition: dialog.c:91
struct _EXECUTE_CONTEXT * PEXECUTE_CONTEXT
struct _GROUP_ATTRIBUTES_CONTEXT GROUP_ATTRIBUTES_CONTEXT
struct _NEW_ITEM_CONTEXT * PNEW_ITEM_CONTEXT
static INT_PTR CALLBACK DIALOG_NEW_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:149
static INT_PTR CALLBACK DIALOG_GROUP_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:414
struct _GROUP_ATTRIBUTES_CONTEXT * PGROUP_ATTRIBUTES_CONTEXT
static VOID DIALOG_AddFilterItem(LPWSTR *p, UINT ids, LPCWSTR filter)
Definition: dialog.c:45
LPCWSTR GroupFormatToFormatName(GROUPFORMAT Format)
Definition: dialog.c:125
PROGGROUP * GROUP_ActiveGroup(VOID)
Definition: group.c:671
INT MAIN_MessageBoxIDS_s(UINT ids_text, LPCWSTR str, UINT ids_title, WORD type)
Definition: main.c:1174
INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type)
Definition: main.c:1159
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
#define PM_DIRECTORY
Definition: resource.h:136
#define PM_ICON
Definition: resource.h:138
#define IDS_SYMBOL_FILES
Definition: resource.h:71
#define IDS_NOT_IMPLEMENTED
Definition: resource.h:59
#define PM_SYMBOL_LIST
Definition: resource.h:143
#define PM_FORMAT_TXT
Definition: resource.h:121
#define PM_DESCRIPTION
Definition: resource.h:131
#define PM_COMMAND_LINE
Definition: resource.h:135
#define PM_NEW_VDM
Definition: resource.h:148
#define PM_NEW_PROGRAM
Definition: resource.h:118
#define IDD_SYMBOL
Definition: resource.h:111
#define IDS_LIBRARIES_DLL
Definition: resource.h:70
#define IDD_PROGRAM
Definition: resource.h:110
#define IDS_MOVE_PROGRAM_1
Definition: resource.h:57
#define PM_ICON_FILE
Definition: resource.h:142
#define PM_FILE
Definition: resource.h:132
#define IDS_ALL_FILES
Definition: resource.h:68
#define IDS_MOVE_PROGRAM_2
Definition: resource.h:58
#define IDD_EXECUTE
Definition: resource.h:112
#define IDS_PROGRAMS
Definition: resource.h:69
#define PM_TO_GROUP
Definition: resource.h:128
#define PM_PERSONAL_GROUP
Definition: resource.h:119
#define PM_PROGRAM
Definition: resource.h:126
#define PM_OTHER_SYMBOL
Definition: resource.h:139
#define PM_COMMON_GROUP
Definition: resource.h:120
#define IDD_NEW
Definition: resource.h:107
#define PM_FROM_GROUP
Definition: resource.h:127
#define PM_NEW_GROUP
Definition: resource.h:117
#define PM_FORMAT
Definition: resource.h:122
#define IDD_COPY_MOVE
Definition: resource.h:108
#define IDD_GROUP
Definition: resource.h:109
#define IDS_SYMBOLS_ICO
Definition: resource.h:72
#define PM_COPY_MOVE_TXT
Definition: resource.h:125
#define PM_BROWSE
Definition: resource.h:149
#define PM_SYMBOL
Definition: resource.h:147
#define PM_COMMAND
Definition: resource.h:146
#define PM_HOT_KEY
Definition: resource.h:137
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: Symbol.h:9
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define OFN_EXPLORER
Definition: commdlg.h:104
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
HMODULE hModule
Definition: animate.c:44
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4736
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
HANDLE HWND
Definition: compat.h:19
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define lstrcpyW
Definition: compat.h:749
#define lstrcpynW
Definition: compat.h:738
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
Definition: vdm.c:1243
BOOL WINAPI EnumResourceNamesW(HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpfun, LONG_PTR lparam)
Definition: res.c:358
const WCHAR * text
Definition: package.c:1794
#define EnableDlgItem(hDlg, nID, bEnable)
Definition: eventvwr.h:55
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLdouble n
Definition: glext.h:7729
GLuint * ids
Definition: glext.h:5907
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
GLfloat GLfloat p
Definition: glext.h:8902
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
const char * filename
Definition: ioapi.h:137
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HICON
Definition: imagelist.c:80
static unsigned(__cdecl *hash_bstr)(bstr_t s)
#define min(a, b)
Definition: monoChain.cc:55
HICON hIcon
Definition: msconfig.c:44
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
long LONG
Definition: pedump.c:60
#define RT_GROUP_ICON
Definition: pedump.c:375
static const WCHAR szName[]
Definition: powrprof.c:45
@ NT_Unicode
Definition: progman.h:109
@ Win_311
Definition: progman.h:107
enum _GROUPFORMAT GROUPFORMAT
#define MAX_PATHNAME_LEN
Definition: progman.h:54
#define HKCOMB_S
Definition: commctrl.h:2228
#define HKCOMB_A
Definition: commctrl.h:2230
#define HKCOMB_C
Definition: commctrl.h:2229
#define HOTKEYF_CONTROL
Definition: commctrl.h:2224
#define HKM_SETHOTKEY
Definition: commctrl.h:2236
#define HKM_SETRULES
Definition: commctrl.h:2238
#define HKCOMB_NONE
Definition: commctrl.h:2227
#define HKM_GETHOTKEY
Definition: commctrl.h:2237
#define HOTKEYF_ALT
Definition: commctrl.h:2225
#define IDHELP
Definition: resource_2.h:8
#define ENM_CHANGE
Definition: richedit.h:468
#define EM_GETEVENTMASK
Definition: richedit.h:92
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define REG_DWORD
Definition: sdbapi.c:596
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2492
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
Definition: strsafe.h:236
HINSTANCE hInstance
Definition: precomp.h:43
PROGRAM * Program
Definition: dialog.c:257
PROGGROUP * hToGroup
Definition: dialog.c:258
BOOL bCheckBinaryType
Definition: dialog.c:919
HKEY hKeyPMRecentFilesList
Definition: dialog.c:917
DWORD dwMaxFiles
Definition: dialog.c:918
GROUPFORMAT format
Definition: dialog.c:405
HMODULE hLibrary
Definition: dialog.c:549
WCHAR szName[MAX_PATH]
Definition: dialog.c:551
LPWSTR hName
Definition: progman.h:138
PROGGROUP * hNext
Definition: progman.h:115
LPWSTR hName
Definition: progman.h:93
PROGGROUP * hGroup
Definition: progman.h:83
Definition: format.c:58
ULONG_PTR itemData
Definition: winuser.h:3096
HINSTANCE hInstance
Definition: commdlg.h:362
HWND hwndOwner
Definition: commdlg.h:361
DWORD Flags
Definition: commdlg.h:373
DWORD nMaxFileTitle
Definition: commdlg.h:370
WORD nFileExtension
Definition: commdlg.h:375
LPCWSTR lpTemplateName
Definition: commdlg.h:379
LPWSTR lpstrFile
Definition: commdlg.h:367
DWORD nMaxCustFilter
Definition: commdlg.h:365
LPCWSTR lpstrInitialDir
Definition: commdlg.h:371
LPOFNHOOKPROC lpfnHook
Definition: commdlg.h:378
WORD nFileOffset
Definition: commdlg.h:374
LPCWSTR lpstrTitle
Definition: commdlg.h:372
LPWSTR lpstrFileTitle
Definition: commdlg.h:369
LPWSTR lpstrCustomFilter
Definition: commdlg.h:364
LPCWSTR lpstrDefExt
Definition: commdlg.h:376
LPARAM lCustData
Definition: commdlg.h:377
DWORD lStructSize
Definition: commdlg.h:360
DWORD nMaxFile
Definition: commdlg.h:368
LPCWSTR lpstrFilter
Definition: commdlg.h:363
DWORD nFilterIndex
Definition: commdlg.h:366
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define max(a, b)
Definition: svc.c:63
int32_t INT_PTR
Definition: typedefs.h:64
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
int ret
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1384
#define ZeroMemory
Definition: winbase.h:1736
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:367
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2108
#define SCS_WOW_BINARY
Definition: winbase.h:267
_In_ BOOL bEnable
Definition: winddi.h:3426
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
int * PINT
Definition: windef.h:177
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define SW_SHOWNORMAL
Definition: winuser.h:773
#define LB_ERR
Definition: winuser.h:2435
#define CB_SETITEMDATA
Definition: winuser.h:1969
#define LB_GETCOUNT
Definition: winuser.h:2041
#define ODS_SELECTED
Definition: winuser.h:2548
#define LB_GETITEMDATA
Definition: winuser.h:2044
#define GetWindowLongPtrW
Definition: winuser.h:4832
#define COLOR_WINDOW
Definition: winuser.h:921
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define STM_SETICON
Definition: winuser.h:2095
#define IDCANCEL
Definition: winuser.h:834
#define BST_UNCHECKED
Definition: winuser.h:199
#define IMAGE_ICON
Definition: winuser.h:212
#define CB_ERRSPACE
Definition: winuser.h:2439
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define COLOR_HIGHLIGHT
Definition: winuser.h:929
BOOL WINAPI DrawIcon(_In_ HDC, _In_ int, _In_ int, _In_ HICON)
Definition: cursoricon.c:2070
HICON WINAPI CopyIcon(_In_ HICON)
Definition: cursoricon.c:2063
#define WM_COMMAND
Definition: winuser.h:1743
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define CB_ERR
Definition: winuser.h:2438
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2255
#define CB_SETCURSEL
Definition: winuser.h:1964
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1742
#define MB_YESNO
Definition: winuser.h:820
#define LB_ADDSTRING
Definition: winuser.h:2034
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:833
#define WM_DRAWITEM
Definition: winuser.h:1648
#define LB_SETITEMHEIGHT
Definition: winuser.h:2069
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define LB_DELETESTRING
Definition: winuser.h:2035
HWND WINAPI SetFocus(_In_opt_ HWND)
#define CB_ADDSTRING
Definition: winuser.h:1939
#define CB_GETITEMDATA
Definition: winuser.h:1953
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define MB_OK
Definition: winuser.h:793
#define WM_MEASUREITEM
Definition: winuser.h:1649
struct tagMEASUREITEMSTRUCT * PMEASUREITEMSTRUCT
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define MB_DEFBUTTON2
Definition: winuser.h:802
struct tagDRAWITEMSTRUCT * PDRAWITEMSTRUCT
#define LR_DEFAULTCOLOR
Definition: winuser.h:1090
#define LB_SETCURSEL
Definition: winuser.h:2066
BOOL WINAPI CloseWindow(_In_ HWND)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define CB_INSERTSTRING
Definition: winuser.h:1960
#define IDYES
Definition: winuser.h:838
#define LB_GETCURSEL
Definition: winuser.h:2042
#define CB_GETCURSEL
Definition: winuser.h:1946
#define SetWindowLongPtrW
Definition: winuser.h:5358
#define SW_SHOWMINNOACTIVE
Definition: winuser.h:780
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define CBN_EDITCHANGE
Definition: winuser.h:1978
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2105
#define EN_CHANGE
Definition: winuser.h:2025
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185