ReactOS  0.4.14-dev-98-gb0d4763
group.c
Go to the documentation of this file.
1 /*
2  * Program Manager
3  *
4  * Copyright 1996 Ulrich Schmid
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 /*
22  * PROJECT: ReactOS Program Manager
23  * COPYRIGHT: GPL - See COPYING in the top level directory
24  * FILE: base/shell/progman/group.c
25  * PURPOSE: Program group files helper functions
26  * PROGRAMMERS: Ulrich Schmid
27  * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
28  */
29 
30 #include "progman.h"
31 
32 /***********************************************************************
33  *
34  * UX Theming helpers, dropped from msconfig_new/comctl32ex/uxthemesupp.c
35  *
36  */
37 
39 
42 
45 
46 
47 static BOOL
49 {
50  if (hUxTheme) return TRUE;
51 
52  hUxTheme = LoadLibraryW(L"uxtheme.dll");
53  if (hUxTheme == NULL) return FALSE;
54 
56  (ETDTProc)GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
58  (SWTProc)GetProcAddress(hUxTheme, "SetWindowTheme");
59 
60  return TRUE;
61 }
62 
63 #if 0
64 static VOID
65 CleanupUxTheme(VOID)
66 {
68  hUxTheme = NULL;
69 }
70 #endif
71 
72 
74 // Taken from WinSpy++ 1.7
75 // http://www.catch22.net/software/winspy
76 // Copyright (c) 2002 by J Brown
77 //
78 
79 HRESULT
80 WINAPI
83 {
84  if (!InitUxTheme())
86 
89 
91 }
92 
93 HRESULT
94 WINAPI
96  _In_ LPCWSTR pszSubAppName,
97  _In_ LPCWSTR pszSubIdList)
98 {
99  if (!InitUxTheme())
101 
102  if (!fnSetWindowTheme)
104 
105  return fnSetWindowTheme(hwnd, pszSubAppName, pszSubIdList);
106 }
107 
108 
109 /***********************************************************************
110  *
111  * GROUP_GroupWndProc
112  */
113 
114 static
115 LRESULT
116 CALLBACK
118 {
119  PROGGROUP* group;
120  INT iItem;
121  LVITEMW lvItem;
122  POINT pt;
123 
125 
126  switch (uMsg)
127  {
128  case WM_NCCREATE:
129  {
132  group = (PROGGROUP*)pMDIcs->lParam;
134 
135  if (group->bIsCommonGroup)
136  {
137  DefMDIChildProcW(hWnd, WM_SETICON, ICON_BIG,
138  (LPARAM)CopyImage(Globals.hCommonGroupIcon,
139  IMAGE_ICON,
143  DefMDIChildProcW(hWnd, WM_SETICON, ICON_SMALL,
144  (LPARAM)CopyImage(Globals.hCommonGroupIcon,
145  IMAGE_ICON,
149  }
150  else
151  {
152  DefMDIChildProcW(hWnd, WM_SETICON, ICON_BIG,
153  (LPARAM)CopyImage(Globals.hPersonalGroupIcon,
154  IMAGE_ICON,
158  DefMDIChildProcW(hWnd, WM_SETICON, ICON_SMALL,
159  (LPARAM)CopyImage(Globals.hPersonalGroupIcon,
160  IMAGE_ICON,
164  }
165  break;
166  }
167 
168  case WM_NCDESTROY:
169  SetWindowLongPtrW(hWnd, 0, 0);
170  break;
171 
172  case WM_CREATE:
173  {
174  DWORD dwStyle;
175  RECT rect;
177  group->hListView = CreateWindowW(WC_LISTVIEW,
178  NULL,
180  0, 0,
181  rect.right - rect.left,
182  rect.bottom - rect.top,
183  hWnd,
184  NULL,
186  NULL);
187  dwStyle = (GetWindowLongPtrW(group->hListView, GWL_STYLE) | LVS_SHOWSELALWAYS) & ~LVS_AUTOARRANGE;
188  SetWindowLongPtrW(group->hListView, GWL_STYLE, dwStyle);
191  InitUxTheme();
192  SetWindowTheme(group->hListView, L"Explorer", NULL);
194  SendMessageA(group->hListView, LVM_SETIMAGELIST, 0, (LPARAM)group->hListLarge);
195  SendMessageA(group->hListView, LVM_SETICONSPACING, 0, MAKELPARAM(80, 64));
196  break;
197  }
198 
199  case WM_DESTROY:
200  {
201  SendMessageA(group->hListView, LVM_SETIMAGELIST, 0, 0);
202  ImageList_Destroy(group->hListLarge);
203  DestroyWindow(group->hListView);
204  break;
205  }
206 
207  case WM_SIZE:
208  {
209  RECT rect;
210  rect.left = 0;
211  rect.top = 0;
212  rect.right = LOWORD(lParam);
213  rect.bottom = HIWORD(lParam);
215  MoveWindow(group->hListView, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, TRUE);
216  break;
217  }
218 
219  case WM_CLOSE:
221  break;
222 
223  case WM_SYSCOMMAND:
224  if (wParam == SC_CLOSE) wParam = SC_MINIMIZE;
225  break;
226 
227  case WM_CHILDACTIVATE:
228  case WM_NCLBUTTONDOWN:
229  Globals.hActiveGroup = (PROGGROUP*)GetWindowLongPtrW(hWnd, 0);
230  Globals.hActiveGroup->hActiveProgram = NULL;
231  break;
232 
233  case WM_NOTIFY:
234  switch (((LPNMHDR)lParam)->code)
235  {
236  case NM_CLICK:
237  {
238  iItem = ((LPNMITEMACTIVATE)lParam)->iItem;
239  if (iItem == -1)
240  {
241  group->hActiveProgram = NULL;
242  break;
243  }
244 
245  lvItem.mask = LVIF_PARAM;
246  lvItem.iItem = iItem;
247  SendMessageW(group->hListView, LVM_GETITEMW, 0, (LPARAM)&lvItem);
248  group->hActiveProgram = (PROGRAM*)lvItem.lParam;
249  break;
250  }
251 
252  case NM_DBLCLK:
253  {
254  iItem = ((LPNMITEMACTIVATE)lParam)->iItem;
255  if (iItem == -1)
256  break;
257 
258  lvItem.mask = LVIF_PARAM;
259  lvItem.iItem = iItem;
260  SendMessageW(group->hListView, LVM_GETITEMW, 0, (LPARAM)&lvItem);
261  /* ... or use group->hActiveProgram */
262  PROGRAM_ExecuteProgram((PROGRAM*)lvItem.lParam);
263  break;
264  }
265 
266  case LVN_BEGINDRAG:
267  {
268  POINT ptMin;
269 
270  BOOL bFirst = TRUE;
271  for (iItem = SendMessageA(group->hListView, LVM_GETNEXTITEM, -1, LVNI_SELECTED);
272  iItem != -1;
273  iItem = SendMessageA(group->hListView, LVM_GETNEXTITEM, iItem, LVNI_SELECTED))
274  {
275  if (bFirst)
276  {
277  group->hDragImageList = (HIMAGELIST)SendMessageA(group->hListView,
279  iItem,
280  (LPARAM)&pt);
281  ptMin = pt;
282  bFirst = FALSE;
283  }
284  else
285  {
286  HIMAGELIST hOneImageList, hTempImageList;
287 
288  hOneImageList = (HIMAGELIST)SendMessageA(group->hListView,
290  iItem,
291  (LPARAM)&pt);
292  hTempImageList = ImageList_Merge(group->hDragImageList,
293  0,
294  hOneImageList,
295  0,
296  pt.x - ptMin.x,
297  pt.y - ptMin.y);
298  ImageList_Destroy(group->hDragImageList);
299  ImageList_Destroy(hOneImageList);
300  group->hDragImageList = hTempImageList;
301  ptMin.x = min(ptMin.x, pt.x);
302  ptMin.y = min(ptMin.y, pt.y);
303  }
304  }
305  // pt = ((LPNMLISTVIEW)lParam)->ptAction;
306  pt.x = ((LPNMLISTVIEW)lParam)->ptAction.x;
307  pt.y = ((LPNMLISTVIEW)lParam)->ptAction.y;
308  group->ptStart = pt;
309  pt.x -= ptMin.x;
310  pt.y -= ptMin.y;
311  ImageList_BeginDrag(group->hDragImageList, 0, pt.x, pt.y);
312  MapWindowPoints(group->hListView, Globals.hMDIWnd, &pt, 1);
313  ImageList_DragEnter(Globals.hMDIWnd, pt.x, pt.y);
314  group->bDragging = TRUE;
315  group->hOldCursor = GetCursor();
316  SetCapture(group->hWnd);
317 
318  break;
319  }
320  }
321  break;
322 
323  case WM_MOUSEMOVE:
324  if (group->bDragging)
325  {
326  pt.x = GET_X_LPARAM(lParam);
327  pt.y = GET_Y_LPARAM(lParam);
328  MapWindowPoints(group->hWnd, Globals.hMDIWnd, &pt, 1);
329  ImageList_DragMove(pt.x, pt.y);
330  }
331  break;
332 
333  case WM_LBUTTONUP:
334  if (group->bDragging)
335  {
336  // LVHITTESTINFO lvhti;
337  POINT ptHit;
338 
339  group->bDragging = FALSE;
340  ImageList_DragLeave(Globals.hMDIWnd);
342  ImageList_Destroy(group->hDragImageList);
343  ReleaseCapture();
344  SetCursor(group->hOldCursor);
345  ptHit.x = GET_X_LPARAM(lParam);
346  ptHit.y = GET_Y_LPARAM(lParam);
347  MapWindowPoints(group->hWnd, group->hListView, &ptHit, 1);
348  for (iItem = SendMessageA(group->hListView, LVM_GETNEXTITEM, -1, LVNI_SELECTED);
349  iItem != -1;
350  iItem = SendMessageA(group->hListView, LVM_GETNEXTITEM, iItem, LVNI_SELECTED))
351  {
352  SendMessageA(group->hListView, LVM_GETITEMPOSITION, iItem, (LPARAM)&pt);
353  pt.x += ptHit.x - group->ptStart.x;
354  pt.y += ptHit.y - group->ptStart.y;
355  SendMessageA(group->hListView, LVM_SETITEMPOSITION, iItem, MAKELPARAM(pt.x, pt.y));
356  }
357  }
358  break;
359  }
360 
361  return DefMDIChildProcW(hWnd, uMsg, wParam, lParam);
362 }
363 
364 /***********************************************************************
365  *
366  * GROUP_RegisterGroupWinClass
367  */
368 
370 {
371  WNDCLASSW wndClass;
372 
373  wndClass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
374  wndClass.lpfnWndProc = GROUP_GroupWndProc;
375  wndClass.cbClsExtra = 0;
376  wndClass.cbWndExtra = sizeof(LONG_PTR);
377  wndClass.hInstance = Globals.hInstance;
380  wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
381  wndClass.lpszMenuName = NULL;
383 
384  return RegisterClassW(&wndClass);
385 }
386 
387 /***********************************************************************
388  *
389  * GROUP_NewGroup
390  */
391 
393 {
394  HANDLE hFile;
395  WCHAR szGrpFile[MAX_PATHNAME_LEN] = L"";
397 
398  // ZeroMemory(szTitle, sizeof(szTitle));
399  // ZeroMemory(szGrpFile, sizeof(szGrpFile));
400 
402  return;
403 
404  /*
405  * Just check whether the group file does exist. If it does, close the handle, because GRPFILE_ReadGroupFile will
406  * reopen the file for loading. If it doesn't exist, we create a new one.
407  */
410  {
411  /* File doesn't exist */
412  PROGGROUP* hGroup = GROUP_AddGroup(format, bIsCommonGroup, szTitle, szGrpFile,
415  0, 0, SW_SHOWNORMAL, 0, 0, FALSE, FALSE);
416  if (hGroup)
417  GRPFILE_WriteGroupFile(hGroup);
418  }
419  else
420  {
421  /* File exist */
423  GRPFILE_ReadGroupFile(szGrpFile, bIsCommonGroup);
424  }
425 
426  /* FIXME Update progman.ini */
427 }
428 
429 /***********************************************************************
430  *
431  * GROUP_AddGroup
432  */
433 
434 PROGGROUP*
435 GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWSTR lpszGrpFile,
436  INT left, INT top, INT right, INT bottom, INT xMin, INT yMin, INT nCmdShow,
437  WORD cxIcon, WORD cyIcon, BOOL bOverwriteFileOk,
438  /* FIXME shouldn't be necessary */
439  BOOL bSuppressShowWindow)
440 {
441  PROGGROUP* hGroup;
442  PROGGROUP* hPrior;
443  PROGGROUP** p;
444  LPWSTR hName;
445  LPWSTR hGrpFile;
446  LPCWSTR GroupFileName;
447  INT skip;
448  INT width;
449  INT height;
450  INT seqnum;
452  WINDOWPLACEMENT WndPl;
453 
454  WndPl.length = sizeof(WndPl);
455 
456  // FIXME: Use system default position in case we don't place the window at a given (x,y) coordinate.
457 
458  if (bIsCommonGroup)
459  {
460  if (swscanf(lpszGrpFile,
461  L"%d %d %d %d %d %d %d %n",
462  &WndPl.rcNormalPosition.left,
463  &WndPl.rcNormalPosition.top,
464  &WndPl.rcNormalPosition.right,
465  &WndPl.rcNormalPosition.bottom,
466  &WndPl.ptMinPosition.x,
467  &WndPl.ptMinPosition.y,
468  &WndPl.showCmd,
469  &skip) == 7)
470  {
471  WndPl.flags = WPF_SETMINPOSITION;
474  GroupFileName = &lpszGrpFile[skip];
475  }
476  else
477  {
478 #if 0 // FIXME!
481  WndPl.rcNormalPosition.right = 0;
482  WndPl.rcNormalPosition.bottom = 0;
485  WndPl.showCmd = SW_SHOWNORMAL;
486  GroupFileName = lpszGrpFile;
487 #else
488  WndPl.flags = WPF_SETMINPOSITION;
489  WndPl.ptMinPosition.x = xMin;
490  WndPl.ptMinPosition.y = yMin;
491  WndPl.rcNormalPosition.left = left;
492  WndPl.rcNormalPosition.top = top;
493  WndPl.rcNormalPosition.right = right;
495  width = right - left;
496  height = bottom - top;
497  WndPl.showCmd = nCmdShow;
498  GroupFileName = lpszGrpFile;
499 #endif
500  }
501  }
502  else
503  {
504  WndPl.flags = WPF_SETMINPOSITION;
505  WndPl.ptMinPosition.x = xMin;
506  WndPl.ptMinPosition.y = yMin;
507  WndPl.rcNormalPosition.left = left;
508  WndPl.rcNormalPosition.top = top;
509  WndPl.rcNormalPosition.right = right;
511  width = right - left;
512  height = bottom - top;
513  WndPl.showCmd = nCmdShow;
514  GroupFileName = lpszGrpFile;
515  }
516 
517  hGroup = Alloc(HEAP_ZERO_MEMORY, sizeof(*hGroup));
518  hName = Alloc(HEAP_ZERO_MEMORY, (wcslen(lpszName) + 1) * sizeof(WCHAR));
519  hGrpFile = Alloc(HEAP_ZERO_MEMORY, (wcslen(GroupFileName) + 1) * sizeof(WCHAR));
520  if (!hGroup || !hName || !hGrpFile)
521  {
523  if (hGroup) Free(hGroup);
524  if (hName) Free(hName);
525  if (hGrpFile) Free(hGrpFile);
526  return NULL;
527  }
528  memcpy(hName , lpszName , (wcslen(lpszName) + 1) * sizeof(WCHAR));
529  memcpy(hGrpFile, GroupFileName, (wcslen(GroupFileName) + 1) * sizeof(WCHAR));
530 
531  Globals.hActiveGroup = hGroup;
532 
533  seqnum = 1;
534  hPrior = NULL;
535  for (p = &Globals.hGroups; *p; p = &hPrior->hNext)
536  {
537  hPrior = *p;
538  if (hPrior->seqnum >= seqnum)
539  seqnum = hPrior->seqnum + 1;
540  }
541  *p = hGroup;
542 
543  hGroup->hPrior = hPrior;
544  hGroup->hNext = NULL;
545  hGroup->format = format;
546  hGroup->bIsCommonGroup = bIsCommonGroup;
547  hGroup->hName = hName;
548  hGroup->hGrpFile = hGrpFile;
549  hGroup->bOverwriteFileOk = bOverwriteFileOk;
550  hGroup->seqnum = seqnum;
551  hGroup->nCmdShow = nCmdShow;
552 #if 0
553  hGroup->x = x;
554  hGroup->y = y;
555  hGroup->width = width;
556  hGroup->height = height;
557 #endif
558  hGroup->iconx = cxIcon;
559  hGroup->icony = cyIcon;
560  hGroup->hPrograms = NULL;
561  hGroup->hActiveProgram = NULL;
562  hGroup->TagsSize = 0;
563  hGroup->Tags = NULL;
564 
566  mcs.szTitle = lpszName;
567  mcs.hOwner = NULL;
568  mcs.x = WndPl.rcNormalPosition.left;
569  mcs.y = WndPl.rcNormalPosition.top;
570  mcs.cx = width;
571  mcs.cy = height;
572  mcs.style = 0;
573  mcs.lParam = (LPARAM)hGroup;
574 
575  hGroup->hWnd = (HWND)SendMessageW(Globals.hMDIWnd, WM_MDICREATE, 0, (LPARAM)&mcs);
576 
577  SetWindowPlacement(hGroup->hWnd, &WndPl);
578 
579 #if 1
580  if (!bSuppressShowWindow) /* FIXME shouldn't be necessary */
581 #endif
582  UpdateWindow(hGroup->hWnd);
583 
584  return hGroup;
585 }
586 
587 
588 
589 
590 
591 /***********************************************************************
592  *
593  * GROUP_ModifyGroup
594  */
595 
597 {
598  WCHAR Dest[MAX_PATHNAME_LEN]; // szName
599  WCHAR szGrpFile[MAX_PATHNAME_LEN]; // szFile
600 
601  wcsncpy(Dest, hGroup->hName, ARRAYSIZE(Dest));
602  wcsncpy(szGrpFile, hGroup->hGrpFile, ARRAYSIZE(szGrpFile));
603 
604  if (!DIALOG_GroupAttributes(hGroup->format, Dest, szGrpFile, MAX_PATHNAME_LEN))
605  return;
606 
607  if (wcscmp(szGrpFile, hGroup->hGrpFile))
608  hGroup->bOverwriteFileOk = FALSE;
609 
610  MAIN_ReplaceString(&hGroup->hName, Dest);
611  MAIN_ReplaceString(&hGroup->hGrpFile, szGrpFile);
612 
613  GRPFILE_WriteGroupFile(hGroup);
614 
615  /* FIXME Delete old GrpFile if GrpFile changed */
616 
617  /* FIXME Update progman.ini */
618 
619  SetWindowTextW(hGroup->hWnd, Dest);
620 }
621 
622 /***********************************************************************
623  *
624  * GROUP_DeleteGroup
625  */
626 
628 {
629  if (Globals.hActiveGroup == hGroup)
630  Globals.hActiveGroup = NULL;
631 
632  if (hGroup->hPrior)
633  hGroup->hPrior->hNext = hGroup->hNext;
634  else
635  Globals.hGroups = hGroup->hNext;
636 
637  if (hGroup->hNext)
638  hGroup->hNext->hPrior = hGroup->hPrior;
639 
640  while (hGroup->hPrograms)
642 
643  /* FIXME Update progman.ini */
644 
645  SendMessageW(Globals.hMDIWnd, WM_MDIDESTROY, (WPARAM)hGroup->hWnd, 0);
646 
647  if (hGroup->Tags)
648  Free(hGroup->Tags);
649  Free(hGroup->hName);
650  Free(hGroup->hGrpFile);
651  Free(hGroup);
652 }
653 
654 /***********************************************************************
655  *
656  * GROUP_ShowGroupWindow
657  */
658 
659 /* FIXME shouldn't be necessary */
661 {
662  ShowWindow(hGroup->hWnd, hGroup->nCmdShow);
663  UpdateWindow(hGroup->hWnd);
664 }
665 
666 /***********************************************************************
667  *
668  * GROUP_ActiveGroup
669  */
670 
672 {
673  return Globals.hActiveGroup;
674 }
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1674
struct tagMDICREATESTRUCTW * LPMDICREATESTRUCTW
#define DEF_GROUP_WIN_XPOS
Definition: progman.h:62
static BOOL InitUxTheme(VOID)
Definition: group.c:48
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HRESULT
Definition: msvc.h:9
GLint GLint GLsizei width
Definition: gl.h:1546
#define LONG_PTR
Definition: treelist.c:79
static HMODULE hUxTheme
Definition: group.c:38
ATOM GROUP_RegisterGroupWinClass(VOID)
Definition: group.c:369
BOOL DIALOG_GroupAttributes(GROUPFORMAT format, LPWSTR lpszTitle, LPWSTR lpszGrpFile, INT nSize)
Definition: dialog.c:484
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define IMAGE_ICON
Definition: winuser.h:212
#define LVN_BEGINDRAG
Definition: commctrl.h:3112
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
long y
Definition: polytest.cpp:48
UINT style
Definition: winuser.h:3150
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
LPCWSTR lpszMenuName
Definition: winuser.h:3158
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
long x
Definition: polytest.cpp:48
INT seqnum
Definition: progman.h:130
static LRESULT CALLBACK GROUP_GroupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: group.c:117
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2239
WORD ATOM
Definition: dimm.idl:113
#define pt(x, y)
Definition: drawing.c:79
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT icony
Definition: progman.h:137
#define DEF_GROUP_WIN_YPOS
Definition: progman.h:63
#define MAKELPARAM(l, h)
Definition: winuser.h:3947
INT height
Definition: progman.h:135
BOOL WINAPI ImageList_DragMove(INT x, INT y)
Definition: imagelist.c:1070
PROGGROUP * hPrior
Definition: progman.h:114
#define CALLBACK
Definition: compat.h:27
DWORD GRPFILE_ReadGroupFile(LPCWSTR lpszPath, BOOL bIsCommonGroup)
Definition: grpfile.c:65
INT iconx
Definition: progman.h:136
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND hWnd
Definition: settings.c:17
LONG top
Definition: windef.h:292
LRESULT WINAPI DefMDIChildProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HANDLE HWND
Definition: compat.h:13
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
HWND hWnd
Definition: progman.h:116
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define CS_HREDRAW
Definition: winuser.h:648
#define GWL_EXSTYLE
Definition: winuser.h:845
#define SM_CYSMICON
Definition: winuser.h:1003
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int cbClsExtra
Definition: winuser.h:3152
#define IDS_OUT_OF_MEMORY
Definition: resource.h:63
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
HCURSOR WINAPI GetCursor(void)
Definition: cursoricon.c:2649
#define LVNI_SELECTED
Definition: commctrl.h:2396
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
#define LVM_SETICONSPACING
Definition: commctrl.h:2693
#define GetWindowLongPtrW
Definition: winuser.h:4730
LONG left
Definition: windef.h:291
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define LVM_CREATEDRAGIMAGE
Definition: commctrl.h:2624
LONG right
Definition: windef.h:293
VOID WINAPI ImageList_EndDrag(void)
Definition: imagelist.c:1847
LPWSTR hGrpFile
Definition: progman.h:129
#define WM_NCCREATE
Definition: winuser.h:1665
BOOL WINAPI DestroyWindow(_In_ HWND)
VOID PROGRAM_DeleteProgram(PROGRAM *hProgram, BOOL bUpdateGrpFile)
Definition: program.c:289
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
#define COLOR_WINDOW
Definition: winuser.h:908
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
GROUPFORMAT format
Definition: progman.h:125
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define FILE_SHARE_READ
Definition: compat.h:125
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
PROGGROUP * GROUP_ActiveGroup(VOID)
Definition: group.c:671
#define ICON_SMALL
Definition: tnclass.cpp:48
PROGGROUP * GROUP_AddGroup(GROUPFORMAT format, BOOL bIsCommonGroup, LPCWSTR lpszName, LPCWSTR lpszGrpFile, INT left, INT top, INT right, INT bottom, INT xMin, INT yMin, INT nCmdShow, WORD cxIcon, WORD cyIcon, BOOL bOverwriteFileOk, BOOL bSuppressShowWindow)
Definition: group.c:435
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
BOOL WINAPI ImageList_DragEnter(HWND hwndLock, INT x, INT y)
Definition: imagelist.c:958
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
enum _GROUPFORMAT GROUPFORMAT
#define WM_CHILDACTIVATE
Definition: winuser.h:1620
unsigned int BOOL
Definition: ntddk_ex.h:94
#define LVS_EX_SNAPTOGRID
Definition: commctrl.h:2720
SIZE_T TagsSize
Definition: progman.h:142
LPWSTR hName
Definition: progman.h:138
WNDPROC lpfnWndProc
Definition: winuser.h:3151
BOOL GRPFILE_WriteGroupFile(PROGGROUP *hGroup)
Definition: grpfile.c:358
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:1956
#define SM_CXICON
Definition: winuser.h:962
#define CW_USEDEFAULT
Definition: winuser.h:225
VOID PROGRAM_ExecuteProgram(PROGRAM *hProgram)
Definition: program.c:274
#define LoadLibraryW(x)
Definition: compat.h:404
PROGGROUP * hNext
Definition: progman.h:115
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpszClassName
Definition: winuser.h:3159
static SWTProc fnSetWindowTheme
Definition: group.c:44
LONG_PTR LPARAM
Definition: windef.h:208
#define LVS_AUTOARRANGE
Definition: commctrl.h:2244
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: group.c:81
GLint GLint bottom
Definition: glext.h:7726
VOID GROUP_ShowGroupWindow(PROGGROUP *hGroup)
Definition: group.c:660
#define MAX_PATHNAME_LEN
Definition: progman.h:54
#define OPEN_EXISTING
Definition: compat.h:426
struct tagNMITEMACTIVATE * LPNMITEMACTIVATE
#define WM_DESTROY
Definition: winuser.h:1591
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
Definition: group.c:40
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, INT dx, INT dy)
Definition: imagelist.c:2300
GLboolean GLuint group
Definition: glext.h:11120
#define CS_VREDRAW
Definition: winuser.h:653
#define LVS_EX_BORDERSELECT
Definition: commctrl.h:2716
#define FreeLibrary(x)
Definition: compat.h:405
#define WS_OVERLAPPED
Definition: pedump.c:615
#define LVM_SETITEMPOSITION
Definition: commctrl.h:2452
int cbWndExtra
Definition: winuser.h:3153
#define DEF_GROUP_WIN_HEIGHT
Definition: progman.h:65
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_SIZE
Definition: winuser.h:1593
LONG HRESULT
Definition: typedefs.h:77
#define ILC_COLOR24
Definition: commctrl.h:342
#define WM_CLOSE
Definition: winuser.h:1603
#define WM_NCDESTROY
Definition: winuser.h:1666
#define WINAPI
Definition: msvc.h:8
#define WPF_SETMINPOSITION
Definition: winuser.h:2508
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint left
Definition: glext.h:7726
HICON hIcon
Definition: winuser.h:3155
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2696
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
GLdouble GLdouble right
Definition: glext.h:10859
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
VOID GROUP_ModifyGroup(PROGGROUP *hGroup)
Definition: group.c:596
UINT mask
Definition: commctrl.h:2332
#define SM_CXSMICON
Definition: winuser.h:1002
BOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack, INT iTrack, INT dxHotspot, INT dyHotspot)
Definition: imagelist.c:638
#define SM_CYICON
Definition: winuser.h:963
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
static const WCHAR L[]
Definition: oid.c:1250
LPVOID lpCreateParams
Definition: winuser.h:2929
struct _IMAGELIST * HIMAGELIST
Definition: commctrl.h:309
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define ILC_MASK
Definition: commctrl.h:336
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
INT width
Definition: progman.h:134
#define GENERIC_READ
Definition: compat.h:124
#define CS_DBLCLKS
Definition: winuser.h:646
_In_ HANDLE hFile
Definition: mswsock.h:90
#define NM_CLICK
Definition: commctrl.h:130
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define WM_MDIDESTROY
Definition: winuser.h:1795
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2699
VOID MAIN_ReplaceString(LPWSTR *string, LPWSTR replace)
Definition: main.c:1192
#define SC_MINIMIZE
Definition: winuser.h:2561
HCURSOR hCursor
Definition: winuser.h:3156
#define _In_
Definition: no_sal2.h:204
#define GWL_STYLE
Definition: winuser.h:846
POINT ptMinPosition
Definition: winuser.h:3267
#define LVM_SETIMAGELIST
Definition: commctrl.h:2275
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
VOID GROUP_DeleteGroup(PROGGROUP *hGroup)
Definition: group.c:627
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define LR_COPYFROMRESOURCE
Definition: winuser.h:1089
PROGRAM * hActiveProgram
Definition: progman.h:140
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
Definition: imagelist.c:992
#define NM_DBLCLK
Definition: commctrl.h:131
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
struct tagNMLISTVIEW * LPNMLISTVIEW
#define STRING_GROUP_WIN_CLASS_NAME
Definition: progman.h:252
HBRUSH hbrBackground
Definition: winuser.h:3157
VOID GROUP_NewGroup(GROUPFORMAT format, BOOL bIsCommonGroup)
Definition: group.c:392
INT nCmdShow
Definition: progman.h:131
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_LBUTTONUP
Definition: winuser.h:1759
struct tagCREATESTRUCTW * LPCREATESTRUCTW
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define WM_MOUSEMOVE
Definition: winuser.h:1757
#define MB_OK
Definition: winuser.h:784
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
#define CreateFileW
Definition: compat.h:400
#define WM_MDICREATE
Definition: winuser.h:1794
HINSTANCE hInstance
Definition: winuser.h:3154
#define skip(...)
Definition: atltest.h:64
RECT rcNormalPosition
Definition: winuser.h:3269
#define IDI_GROUP_ICON
Definition: resource.h:43
#define WC_LISTVIEW
Definition: commctrl.h:2231
#define IDC_ARROW
Definition: winuser.h:682
#define IDS_ERROR
Definition: resource.h:18
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
#define SC_CLOSE
Definition: winuser.h:2567
#define LVM_GETITEMW
Definition: commctrl.h:2362
#define LVIF_PARAM
Definition: commctrl.h:2283
#define WM_CREATE
Definition: winuser.h:1590
static struct myctx * mcs
Definition: adnstest.c:53
static ETDTProc fnEnableThemeDialogTexture
Definition: group.c:41
#define HIWORD(l)
Definition: typedefs.h:246
HRESULT(WINAPI * SWTProc)(HWND, LPCWSTR, LPCWSTR)
Definition: group.c:43
BOOL bIsCommonGroup
Definition: progman.h:126
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
LONG bottom
Definition: windef.h:294
#define GetProcAddress(x, y)
Definition: compat.h:410
#define DEF_GROUP_WIN_WIDTH
Definition: progman.h:64
#define SetWindowLongPtrW
Definition: winuser.h:5247
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
PVOID Tags
Definition: progman.h:143
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL bOverwriteFileOk
Definition: progman.h:128
LONG_PTR LRESULT
Definition: windef.h:209
HINSTANCE hInstance
Definition: precomp.h:43
#define LVM_GETNEXTITEM
Definition: commctrl.h:2405
#define WS_VISIBLE
Definition: pedump.c:620
PROGRAM * hPrograms
Definition: progman.h:139
_Check_return_ _CRTIMP int __cdecl swscanf(_In_z_ const wchar_t *_Src, _In_z_ _Scanf_format_string_ const wchar_t *_Format,...)
#define WM_SYSCOMMAND
Definition: winuser.h:1723
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define LVM_GETITEMPOSITION
Definition: commctrl.h:2455
#define WM_NOTIFY
Definition: richedit.h:61
#define ICON_BIG
Definition: tnclass.cpp:51
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: group.c:95
INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type)
Definition: main.c:1159