ReactOS  0.4.14-dev-50-g13bb5e2
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 
43 static
44 VOID
46 {
48  *p += wcslen(*p) + 1;
49  lstrcpyW(*p, filter);
50  *p += wcslen(*p) + 1;
51  **p = '\0';
52 }
53 
54 static
55 BOOL
56 DIALOG_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 = 0;
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 
89 static
90 BOOL
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 
102 static
103 BOOL
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 
140 typedef struct _NEW_ITEM_CONTEXT
141 {
145 
146 static
147 INT_PTR
148 CALLBACK
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  {
190  EnableDlgItem(hDlg, PM_FORMAT , TRUE);
191  return TRUE;
192  }
193 
194  case PM_NEW_PROGRAM:
195  {
200  EnableDlgItem(hDlg, PM_FORMAT , FALSE);
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 
233 BOOL 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 
255 typedef struct _COPY_MOVE_CONTEXT
256 {
261 
262 static
263 INT_PTR
264 CALLBACK
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)
299  SendDlgItemMessageW(hDlg, PM_TO_GROUP, CB_SETITEMDATA, iItem, (LPARAM)hGroup);
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 
361 BOOL 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 */
368 BOOL ValidateEditContents(HWND hDlg, INT nIDEditItem)
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 
411 static
412 INT_PTR
413 CALLBACK
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  {
437  EnableDlgItem(hDlg, PM_FILE, FALSE);
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 */
506 static
507 BOOL
508 CALLBACK
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 
528 static
529 VOID
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 
547 typedef struct _PICK_ICON_CONTEXT
548 {
551  WCHAR szName[MAX_PATH]; // LPWSTR lpszIconFile; // INT nSize;
555 
556 #if 0
557 
558 static struct
559 {
560  LPSTR lpszIconFile;
561  INT nSize;
562  HICON *lphIcon;
563  INT *lpnIconIndex;
564 } Symbol;
565 
566 #endif
567 
568 static
569 INT_PTR
570 CALLBACK
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 
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);
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 
678 static
679 VOID
680 DIALOG_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 
720 static
721 INT_PTR
722 CALLBACK
724 {
725  BOOL bEnable;
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);
847  *pProgramAttributes->lpnCmdShow = IsDlgButtonChecked(hDlg, PM_SYMBOL) ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL;
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 
863 BOOL
864 DIALOG_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;
870  DWORD dwSize;
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,
890  &dwSize) != ERROR_SUCCESS
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 
915 typedef struct _EXECUTE_CONTEXT
916 {
921 
922 static
923 INT_PTR
924 CALLBACK
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  {
949  EnableDlgItem(hDlg, PM_NEW_VDM, TRUE);
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  {
981  EnableDlgItem(hDlg, PM_NEW_VDM, TRUE);
983  }
984  }
985  return TRUE;
986  }
987 
988  case PM_COMMAND:
989  {
990  if (HIWORD(wParam) == CBN_EDITCHANGE)
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)
1006  CloseWindow(Globals.hMainWnd);
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,
1036  KEY_READ | KEY_WRITE,
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 }
VOID DIALOG_Execute(VOID)
Definition: dialog.c:1021
#define LB_SETCURSEL
Definition: winuser.h:2045
#define PM_FORMAT_TXT
Definition: resource.h:121
static INT_PTR CALLBACK DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:571
HINSTANCE hInstance
Definition: commdlg.h:362
#define CB_SETITEMDATA
Definition: winuser.h:1948
#define IDD_GROUP
Definition: resource.h:109
#define STM_SETICON
Definition: winuser.h:2074
BOOL WINAPI CloseWindow(_In_ HWND)
DWORD Flags
Definition: commdlg.h:373
static INT_PTR CALLBACK DIALOG_NEW_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:149
UINT WINAPI IsDlgButtonChecked(HWND hDlg, int nIDButton)
Definition: dialog.c:2661
#define max(a, b)
Definition: svc.c:63
#define PM_NEW_VDM
Definition: resource.h:148
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
Definition: strsafe.h:236
#define RT_GROUP_ICON
Definition: pedump.c:375
static HICON
Definition: imagelist.c:84
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2208
BOOL DIALOG_GroupAttributes(GROUPFORMAT format, LPWSTR lpszTitle, LPWSTR lpszGrpFile, INT nSize)
Definition: dialog.c:484
#define TRUE
Definition: types.h:120
PROGGROUP * hToGroup
Definition: dialog.c:258
#define IDOK
Definition: winuser.h:824
#define COLOR_HIGHLIGHT
Definition: winuser.h:916
LPCWSTR lpstrFilter
Definition: commdlg.h:363
#define IMAGE_ICON
Definition: winuser.h:212
BOOL DIALOG_Delete(UINT ids_text_s, LPCWSTR lpszName)
Definition: dialog.c:361
static VOID DestroyIconList(HWND hDlgCtrl)
Definition: dialog.c:530
#define ERROR_SUCCESS
Definition: deptool.c:10
#define IDYES
Definition: winuser.h:829
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define IDS_LIBRARIES_DLL
Definition: resource.h:70
#define LB_ADDSTRING
Definition: winuser.h:2013
struct tagDRAWITEMSTRUCT * PDRAWITEMSTRUCT
struct _PROGRAM_ATTRIBUTES_CONTEXT * PPROGRAM_ATTRIBUTES_CONTEXT
#define PM_COMMAND_LINE
Definition: resource.h:135
#define PM_FROM_GROUP
Definition: resource.h:127
LPCWSTR lpstrInitialDir
Definition: commdlg.h:371
#define EM_GETEVENTMASK
Definition: richedit.h:92
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define KEY_READ
Definition: nt_native.h:1023
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static INT_PTR CALLBACK DIALOG_COPY_MOVE_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:265
const WCHAR * text
Definition: package.c:1827
#define LB_GETITEMDATA
Definition: winuser.h:2023
#define CB_GETITEMDATA
Definition: winuser.h:1932
GLuint GLuint GLsizei count
Definition: gl.h:1545
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
DWORD nMaxFileTitle
Definition: commdlg.h:370
struct _EXECUTE_CONTEXT EXECUTE_CONTEXT
LPWSTR lpstrFile
Definition: commdlg.h:367
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2024
#define IDS_NOT_IMPLEMENTED
Definition: resource.h:59
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:413
struct _PICK_ICON_CONTEXT * PPICK_ICON_CONTEXT
#define CALLBACK
Definition: compat.h:27
_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)
#define SW_SHOWMINNOACTIVE
Definition: winuser.h:771
HWND hWnd
Definition: settings.c:17
GLdouble n
Definition: glext.h:7729
ULONG_PTR itemData
Definition: winuser.h:3067
LONG top
Definition: windef.h:292
#define PM_SYMBOL_LIST
Definition: resource.h:143
HANDLE HWND
Definition: compat.h:13
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
BOOL WINAPI CheckDlgButton(HWND hDlg, int nIDButton, UINT uCheck)
Definition: dialog.c:2785
#define PM_COPY_MOVE_TXT
Definition: resource.h:125
BOOL ValidateEditContents(HWND hDlg, INT nIDEditItem)
Definition: dialog.c:368
HINSTANCE hInstance
Definition: precomp.h:32
#define ZeroMemory
Definition: winbase.h:1635
#define MAX_STRING_LEN
Definition: precomp.h:36
HWND WINAPI SetFocus(_In_opt_ HWND)
static BOOL CALLBACK EnumPickIconResourceProc(HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LONG_PTR lParam)
Definition: dialog.c:509
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
UINT_PTR WPARAM
Definition: windef.h:207
#define GetWindowLongPtrW
Definition: winuser.h:4730
LONG left
Definition: windef.h:291
#define IDS_MOVE_PROGRAM_1
Definition: resource.h:57
int32_t INT_PTR
Definition: typedefs.h:62
char * LPSTR
Definition: xmlstorage.h:182
const char * filename
Definition: ioapi.h:135
#define IDS_ALL_FILES
Definition: resource.h:68
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
Definition: vdm.c:1235
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define COLOR_WINDOW
Definition: winuser.h:908
int32_t INT
Definition: typedefs.h:56
WCHAR szName[MAX_PATH]
Definition: dialog.c:551
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
struct _NEW_ITEM_CONTEXT NEW_ITEM_CONTEXT
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
struct _GROUP_ATTRIBUTES_CONTEXT * PGROUP_ATTRIBUTES_CONTEXT
LPOFNHOOKPROC lpfnHook
Definition: commdlg.h:378
DWORD lStructSize
Definition: commdlg.h:360
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:1091
#define lstrcpynW
Definition: compat.h:397
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
#define LB_SETITEMHEIGHT
Definition: winuser.h:2048
PROGGROUP * GROUP_ActiveGroup(VOID)
Definition: group.c:671
#define PM_OTHER_SYMBOL
Definition: resource.h:139
#define IDHELP
Definition: resource_2.h:8
WORD nFileExtension
Definition: commdlg.h:375
GLuint * ids
Definition: glext.h:5907
LPCWSTR lpstrDefExt
Definition: commdlg.h:376
struct _NEW_ITEM_CONTEXT * PNEW_ITEM_CONTEXT
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
LPCWSTR GroupFormatToFormatName(GROUPFORMAT Format)
Definition: dialog.c:125
unsigned char * LPBYTE
Definition: typedefs.h:52
struct tagMEASUREITEMSTRUCT * PMEASUREITEMSTRUCT
#define MB_YESNO
Definition: winuser.h:811
enum _GROUPFORMAT GROUPFORMAT
#define LB_ERR
Definition: winuser.h:2407
static BOOL DIALOG_Browse(HWND hWnd, LPCWSTR lpszzFilter, LPWSTR lpstrFile, INT nMaxFile)
Definition: dialog.c:56
unsigned int BOOL
Definition: ntddk_ex.h:94
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
long LONG
Definition: pedump.c:60
static VOID DIALOG_AddFilterItem(LPWSTR *p, UINT ids, LPCWSTR filter)
Definition: dialog.c:45
#define IDS_PROGRAMS
Definition: resource.h:69
#define IDS_SYMBOL_FILES
Definition: resource.h:71
LPWSTR hName
Definition: progman.h:138
BOOL WINAPI GetOpenFileNameW(OPENFILENAMEW *ofn)
Definition: filedlg.c:4564
PROGRAM * Program
Definition: dialog.c:257
#define IDD_EXECUTE
Definition: resource.h:112
#define PM_COMMON_GROUP
Definition: resource.h:120
#define HKM_GETHOTKEY
Definition: commctrl.h:2204
WORD nFileOffset
Definition: commdlg.h:374
#define CB_ADDSTRING
Definition: winuser.h:1918
#define SCS_WOW_BINARY
Definition: winbase.h:239
#define CB_INSERTSTRING
Definition: winuser.h:1939
PROGGROUP * hNext
Definition: progman.h:115
smooth NULL
Definition: ftsmooth.c:416
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
GROUPFORMAT format
Definition: dialog.c:405
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI SetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPCWSTR lpString)
Definition: dialog.c:2769
#define IDD_NEW
Definition: resource.h:107
LPCWSTR lpTemplateName
Definition: commdlg.h:379
#define MAX_PATHNAME_LEN
Definition: progman.h:54
#define LB_GETCOUNT
Definition: winuser.h:2020
#define EM_SETEVENTMASK
Definition: richedit.h:102
#define IDS_MOVE_PROGRAM_2
Definition: resource.h:58
#define CB_ERR
Definition: winuser.h:2410
#define PM_DIRECTORY
Definition: resource.h:136
#define PM_NEW_PROGRAM
Definition: resource.h:118
DWORD nFilterIndex
Definition: commdlg.h:366
static INT_PTR CALLBACK DIALOG_PROGRAM_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:723
BOOLEAN Symbol(PVRET pvr)
Definition: symbols.c:2890
struct _COPY_MOVE_CONTEXT * PCOPY_MOVE_CONTEXT
#define KEY_WRITE
Definition: nt_native.h:1031
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:4895
int * PINT
Definition: windef.h:177
#define FreeLibrary(x)
Definition: compat.h:405
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define CBN_EDITCHANGE
Definition: winuser.h:1957
#define PM_DESCRIPTION
Definition: resource.h:131
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
#define PM_ICON_FILE
Definition: resource.h:142
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCWSTR lpstrTitle
Definition: commdlg.h:372
#define PM_FILE
Definition: resource.h:132
struct _EXECUTE_CONTEXT * PEXECUTE_CONTEXT
#define MAX_PATH
Definition: compat.h:26
static VOID DIALOG_Symbol(HWND hWnd, HICON *lphIcon, LPWSTR lpszIconFile, INT *lpnIconIndex, INT nSize)
Definition: dialog.c:680
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL bCheckBinaryType
Definition: dialog.c:919
#define HOTKEYF_CONTROL
Definition: commctrl.h:2191
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD nMaxFile
Definition: commdlg.h:368
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define IDD_COPY_MOVE
Definition: resource.h:108
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define LOAD_LIBRARY_AS_IMAGE_RESOURCE
Definition: winbase.h:341
BOOL WINAPI EnumResourceNamesW(HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpfun, LONG_PTR lparam)
Definition: res.c:358
LRESULT WINAPI SendDlgItemMessageW(HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:2713
int ret
HWND hwndOwner
Definition: commdlg.h:361
static const WCHAR L[]
Definition: oid.c:1250
#define ENM_CHANGE
Definition: richedit.h:468
struct _PICK_ICON_CONTEXT PICK_ICON_CONTEXT
#define CB_ERRSPACE
Definition: winuser.h:2411
#define HKM_SETHOTKEY
Definition: commctrl.h:2203
BOOL DIALOG_New(INT nDefault, PINT pnResult)
Definition: dialog.c:233
static BOOL DIALOG_BrowsePrograms(HWND hWnd, LPWSTR lpszFile, INT nMaxFile)
Definition: dialog.c:91
DWORD nMaxCustFilter
Definition: commdlg.h:365
#define CB_SETCURSEL
Definition: winuser.h:1943
#define WM_COMMAND
Definition: winuser.h:1722
#define BST_UNCHECKED
Definition: winuser.h:199
#define PM_COMMAND
Definition: resource.h:146
struct _GROUP_ATTRIBUTES_CONTEXT GROUP_ATTRIBUTES_CONTEXT
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
static INT_PTR CALLBACK DIALOG_GROUP_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:414
#define PM_FORMAT
Definition: resource.h:122
#define PM_NEW_GROUP
Definition: resource.h:117
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:338
#define IDS_SYMBOLS_ICO
Definition: resource.h:72
UTILMAN_GLOBALS Globals
Definition: dialog.c:15
HICON WINAPI CopyIcon(_In_ HICON)
Definition: cursoricon.c:1980
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define PM_ICON
Definition: resource.h:138
BOOL WINAPI DrawIcon(_In_ HDC, _In_ int, _In_ int, _In_ HICON)
Definition: cursoricon.c:1987
_In_ BOOL bEnable
Definition: winddi.h:3426
BOOL WINAPI EndDialog(HWND hwnd, INT_PTR retval)
Definition: dialog.c:2028
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
static INT_PTR CALLBACK DIALOG_EXECUTE_DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: dialog.c:925
#define lstrcpyW
Definition: compat.h:406
DWORD dwMaxFiles
Definition: dialog.c:918
INT MAIN_MessageBoxIDS_s(UINT ids_text, LPCWSTR str, UINT ids_title, WORD type)
Definition: main.c:1174
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408
#define PM_BROWSE
Definition: resource.h:149
#define PM_PROGRAM
Definition: resource.h:126
HICON hIcon
Definition: msconfig.c:44
static BOOL DIALOG_BrowseSymbols(HWND hWnd, LPWSTR lpszFile, INT nMaxFile)
Definition: dialog.c:104
#define EnableDlgItem(hDlg, nID, bEnable)
Definition: eventvwr.h:52
LPWSTR hName
Definition: progman.h:93
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define min(a, b)
Definition: monoChain.cc:55
#define LB_GETCURSEL
Definition: winuser.h:2021
#define PM_PERSONAL_GROUP
Definition: resource.h:119
unsigned int UINT
Definition: ndis.h:50
#define MB_OK
Definition: winuser.h:784
#define IDD_SYMBOL
Definition: resource.h:111
LPWSTR lpstrFileTitle
Definition: commdlg.h:369
#define BST_CHECKED
Definition: winuser.h:197
#define HKM_SETRULES
Definition: commctrl.h:2205
#define WM_DRAWITEM
Definition: winuser.h:1627
BOOL WINAPI CheckRadioButton(HWND hDlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
Definition: dialog.c:2820
#define MB_DEFBUTTON2
Definition: winuser.h:793
#define IDS_ERROR
Definition: resource.h:18
PROGGROUP * hGroup
Definition: progman.h:83
#define HKCOMB_S
Definition: commctrl.h:2195
LPWSTR lpstrCustomFilter
Definition: commdlg.h:364
static const WCHAR szName[]
Definition: msipriv.h:1194
#define ODS_SELECTED
Definition: winuser.h:2520
HMODULE hLibrary
Definition: dialog.c:549
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2208
HWND WINAPI GetDlgItem(HWND hDlg, int nIDDlgItem)
Definition: dialog.c:2126
#define HIWORD(l)
Definition: typedefs.h:246
struct _PROGRAM_ATTRIBUTES_CONTEXT PROGRAM_ATTRIBUTES_CONTEXT
#define HKCOMB_A
Definition: commctrl.h:2197
#define HKCOMB_C
Definition: commctrl.h:2196
#define SetWindowLongPtrW
Definition: winuser.h:5247
HKEY hKeyPMRecentFilesList
Definition: dialog.c:917
#define IDS_DELETE
Definition: resource.h:40
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define PM_TO_GROUP
Definition: resource.h:128
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
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
#define PM_SYMBOL
Definition: resource.h:147
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077
#define LB_DELETESTRING
Definition: winuser.h:2014
#define REG_DWORD
Definition: sdbapi.c:596
#define HKCOMB_NONE
Definition: commctrl.h:2194
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
INT_PTR WINAPI DialogBoxParamW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
Definition: dialog.c:1871
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
PROGGROUP * DIALOG_CopyMove(PROGRAM *hProgram, BOOL bMove)
Definition: dialog.c:343
#define IDD_PROGRAM
Definition: resource.h:110
#define HOTKEYF_ALT
Definition: commctrl.h:2192
struct _COPY_MOVE_CONTEXT COPY_MOVE_CONTEXT
#define PM_HOT_KEY
Definition: resource.h:137
HMODULE hModule
Definition: animate.c:44
INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type)
Definition: main.c:1159
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1206
LPARAM lCustData
Definition: commdlg.h:377
#define EN_CHANGE
Definition: winuser.h:2004