ReactOS 0.4.15-dev-7958-gcd0bb1a
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
47static 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
64static VOID
65CleanupUxTheme(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
83{
84 if (!InitUxTheme())
86
89
91}
92
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
114static
118{
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,
143 DefMDIChildProcW(hWnd, WM_SETICON, ICON_SMALL,
144 (LPARAM)CopyImage(Globals.hCommonGroupIcon,
149 }
150 else
151 {
152 DefMDIChildProcW(hWnd, WM_SETICON, ICON_BIG,
153 (LPARAM)CopyImage(Globals.hPersonalGroupIcon,
158 DefMDIChildProcW(hWnd, WM_SETICON, ICON_SMALL,
159 (LPARAM)CopyImage(Globals.hPersonalGroupIcon,
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);
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:
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 {
328 MapWindowPoints(group->hWnd, Globals.hMDIWnd, &pt, 1);
330 }
331 break;
332
333 case WM_LBUTTONUP:
334 if (group->bDragging)
335 {
336 // LVHITTESTINFO lvhti;
337 POINT ptHit;
338
339 group->bDragging = FALSE;
342 ImageList_Destroy(group->hDragImageList);
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;
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{
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)
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
435GROUP_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,
466 &WndPl.ptMinPosition.x,
467 &WndPl.ptMinPosition.y,
468 &WndPl.showCmd,
469 &skip) == 7)
470 {
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
489 WndPl.ptMinPosition.x = xMin;
490 WndPl.ptMinPosition.y = yMin;
491 WndPl.rcNormalPosition.left = left;
492 WndPl.rcNormalPosition.top = top;
495 width = right - left;
496 height = bottom - top;
497 WndPl.showCmd = nCmdShow;
498 GroupFileName = lpszGrpFile;
499#endif
500 }
501 }
502 else
503 {
505 WndPl.ptMinPosition.x = xMin;
506 WndPl.ptMinPosition.y = yMin;
507 WndPl.rcNormalPosition.left = left;
508 WndPl.rcNormalPosition.top = top;
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
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}
static struct myctx * mcs
Definition: adnstest.c:53
#define skip(...)
Definition: atltest.h:64
HWND hWnd
Definition: settings.c:17
#define IDS_ERROR
Definition: resource.h:18
#define IDS_OUT_OF_MEMORY
Definition: resource.h:5
BOOL DIALOG_GroupAttributes(GROUPFORMAT format, LPWSTR lpszTitle, LPWSTR lpszGrpFile, INT nSize)
Definition: dialog.c:484
HRESULT(WINAPI * ETDTProc)(HWND, DWORD)
Definition: group.c:40
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: group.c:81
VOID GROUP_ShowGroupWindow(PROGGROUP *hGroup)
Definition: group.c:660
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
static HMODULE hUxTheme
Definition: group.c:38
ATOM GROUP_RegisterGroupWinClass(VOID)
Definition: group.c:369
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: group.c:95
static LRESULT CALLBACK GROUP_GroupWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: group.c:117
static SWTProc fnSetWindowTheme
Definition: group.c:44
static BOOL InitUxTheme(VOID)
Definition: group.c:48
VOID GROUP_ModifyGroup(PROGGROUP *hGroup)
Definition: group.c:596
VOID GROUP_DeleteGroup(PROGGROUP *hGroup)
Definition: group.c:627
HRESULT(WINAPI * SWTProc)(HWND, LPCWSTR, LPCWSTR)
Definition: group.c:43
VOID GROUP_NewGroup(GROUPFORMAT format, BOOL bIsCommonGroup)
Definition: group.c:392
static ETDTProc fnEnableThemeDialogTexture
Definition: group.c:41
PROGGROUP * GROUP_ActiveGroup(VOID)
Definition: group.c:671
INT MAIN_MessageBoxIDS(UINT ids_text, UINT ids_title, WORD type)
Definition: main.c:1159
VOID MAIN_ReplaceString(LPWSTR *string, LPWSTR replace)
Definition: main.c:1192
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
#define IDI_GROUP_ICON
Definition: resource.h:43
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
WORD ATOM
Definition: dimm.idl:113
#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
VOID WINAPI ImageList_EndDrag(void)
Definition: imagelist.c:1847
BOOL WINAPI ImageList_DragEnter(HWND hwndLock, INT x, INT y)
Definition: imagelist.c:958
BOOL WINAPI ImageList_DragMove(INT x, INT y)
Definition: imagelist.c:1070
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
Definition: imagelist.c:992
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, INT dx, INT dy)
Definition: imagelist.c:2300
BOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack, INT iTrack, INT dxHotspot, INT dyHotspot)
Definition: imagelist.c:638
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define FreeLibrary(x)
Definition: compat.h:748
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define CALLBACK
Definition: compat.h:35
#define LoadLibraryW(x)
Definition: compat.h:747
#define FILE_SHARE_READ
Definition: compat.h:136
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLboolean GLuint group
Definition: glext.h:11120
GLint GLint bottom
Definition: glext.h:7726
GLfloat GLfloat p
Definition: glext.h:8902
DWORD GRPFILE_ReadGroupFile(LPCWSTR lpszPath, BOOL bIsCommonGroup)
Definition: grpfile.c:65
BOOL GRPFILE_WriteGroupFile(PROGGROUP *hGroup)
Definition: grpfile.c:358
_Check_return_ _CRTIMP int __cdecl swscanf(_In_z_ const wchar_t *_Src, _In_z_ _Scanf_format_string_ const wchar_t *_Format,...)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
TCHAR szTitle[MAX_LOADSTRING]
Definition: magnifier.c:35
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
#define _In_
Definition: ms_sal.h:308
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
_In_ HANDLE hFile
Definition: mswsock.h:90
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPED
Definition: pedump.c:615
#define WS_VISIBLE
Definition: pedump.c:620
#define DEF_GROUP_WIN_HEIGHT
Definition: progman.h:65
#define DEF_GROUP_WIN_XPOS
Definition: progman.h:62
VOID PROGRAM_DeleteProgram(PROGRAM *hProgram, BOOL bUpdateGrpFile)
Definition: program.c:289
VOID PROGRAM_ExecuteProgram(PROGRAM *hProgram)
Definition: program.c:274
enum _GROUPFORMAT GROUPFORMAT
#define DEF_GROUP_WIN_YPOS
Definition: progman.h:63
#define DEF_GROUP_WIN_WIDTH
Definition: progman.h:64
#define MAX_PATHNAME_LEN
Definition: progman.h:54
#define STRING_GROUP_WIN_CLASS_NAME
Definition: progman.h:252
#define LVM_CREATEDRAGIMAGE
Definition: commctrl.h:2652
#define NM_DBLCLK
Definition: commctrl.h:131
#define LVS_EX_SNAPTOGRID
Definition: commctrl.h:2748
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define LVM_GETITEMPOSITION
Definition: commctrl.h:2483
#define LVS_SHOWSELALWAYS
Definition: commctrl.h:2267
#define LVM_SETITEMPOSITION
Definition: commctrl.h:2480
struct _IMAGELIST * HIMAGELIST
Definition: commctrl.h:324
#define LVS_EX_BORDERSELECT
Definition: commctrl.h:2744
#define LVM_SETIMAGELIST
Definition: commctrl.h:2303
#define LVM_GETNEXTITEM
Definition: commctrl.h:2433
#define NM_CLICK
Definition: commctrl.h:130
#define LVN_BEGINDRAG
Definition: commctrl.h:3140
struct tagNMITEMACTIVATE * LPNMITEMACTIVATE
#define LVIF_PARAM
Definition: commctrl.h:2311
#define WC_LISTVIEW
Definition: commctrl.h:2259
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVM_GETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2727
#define LVM_SETICONSPACING
Definition: commctrl.h:2721
#define ILC_MASK
Definition: commctrl.h:351
#define ILC_COLOR24
Definition: commctrl.h:357
#define LVM_GETITEMW
Definition: commctrl.h:2390
#define LVS_AUTOARRANGE
Definition: commctrl.h:2272
#define LVM_SETEXTENDEDLISTVIEWSTYLE
Definition: commctrl.h:2724
#define WM_NOTIFY
Definition: richedit.h:61
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
& rect
Definition: startmenu.cpp:1413
HINSTANCE hInstance
Definition: precomp.h:43
INT nCmdShow
Definition: progman.h:131
PROGRAM * hPrograms
Definition: progman.h:139
INT seqnum
Definition: progman.h:130
BOOL bOverwriteFileOk
Definition: progman.h:128
PROGRAM * hActiveProgram
Definition: progman.h:140
INT height
Definition: progman.h:135
INT width
Definition: progman.h:134
BOOL bIsCommonGroup
Definition: progman.h:126
LPWSTR hName
Definition: progman.h:138
INT iconx
Definition: progman.h:136
HWND hWnd
Definition: progman.h:116
PVOID Tags
Definition: progman.h:143
PROGGROUP * hPrior
Definition: progman.h:114
GROUPFORMAT format
Definition: progman.h:125
INT icony
Definition: progman.h:137
PROGGROUP * hNext
Definition: progman.h:115
SIZE_T TagsSize
Definition: progman.h:142
LPWSTR hGrpFile
Definition: progman.h:129
RECT rcNormalPosition
Definition: winuser.h:3295
POINT ptMinPosition
Definition: winuser.h:3293
LPCWSTR lpszClassName
Definition: winuser.h:3185
LPCWSTR lpszMenuName
Definition: winuser.h:3184
HBRUSH hbrBackground
Definition: winuser.h:3183
HICON hIcon
Definition: winuser.h:3181
HINSTANCE hInstance
Definition: winuser.h:3180
int cbClsExtra
Definition: winuser.h:3178
UINT style
Definition: winuser.h:3176
WNDPROC lpfnWndProc
Definition: winuser.h:3177
int cbWndExtra
Definition: winuser.h:3179
HCURSOR hCursor
Definition: winuser.h:3182
LPVOID lpCreateParams
Definition: winuser.h:2955
UINT mask
Definition: commctrl.h:2360
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define ICON_BIG
Definition: tnclass.cpp:51
#define ICON_SMALL
Definition: tnclass.cpp:48
#define LONG_PTR
Definition: treelist.c:79
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HCURSOR WINAPI GetCursor(void)
Definition: cursoricon.c:2684
#define SW_SHOWNORMAL
Definition: winuser.h:770
HWND WINAPI SetCapture(_In_ HWND hWnd)
#define CS_VREDRAW
Definition: winuser.h:658
#define WM_CLOSE
Definition: winuser.h:1621
#define WM_SYSCOMMAND
Definition: winuser.h:1741
struct tagMDICREATESTRUCTW * LPMDICREATESTRUCTW
#define GetWindowLongPtrW
Definition: winuser.h:4829
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
#define COLOR_WINDOW
Definition: winuser.h:918
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2890
#define WM_MDICREATE
Definition: winuser.h:1812
#define IMAGE_ICON
Definition: winuser.h:212
#define WM_CHILDACTIVATE
Definition: winuser.h:1638
#define WM_CREATE
Definition: winuser.h:1608
#define LR_COPYFROMRESOURCE
Definition: winuser.h:1099
#define WM_SIZE
Definition: winuser.h:1611
#define CS_HREDRAW
Definition: winuser.h:653
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define IDC_ARROW
Definition: winuser.h:687
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define SM_CYSMICON
Definition: winuser.h:1013
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_MOUSEMOVE
Definition: winuser.h:1775
LRESULT WINAPI DefMDIChildProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CS_DBLCLKS
Definition: winuser.h:651
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2105
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:1987
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_NCCREATE
Definition: winuser.h:1683
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define SC_MINIMIZE
Definition: winuser.h:2586
#define SM_CXSMICON
Definition: winuser.h:1012
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SM_CYICON
Definition: winuser.h:973
#define WM_MDIDESTROY
Definition: winuser.h:1813
BOOL WINAPI UpdateWindow(_In_ HWND)
#define SC_CLOSE
Definition: winuser.h:2592
#define MB_OK
Definition: winuser.h:790
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define CW_USEDEFAULT
Definition: winuser.h:225
#define WM_NCDESTROY
Definition: winuser.h:1684
#define WM_DESTROY
Definition: winuser.h:1609
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SetWindowLongPtrW
Definition: winuser.h:5346
#define GWL_STYLE
Definition: winuser.h:852
#define SM_CXICON
Definition: winuser.h:972
BOOL WINAPI SetWindowPlacement(_In_ HWND hWnd, _In_ const WINDOWPLACEMENT *)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WPF_SETMINPOSITION
Definition: winuser.h:2533
struct tagCREATESTRUCTW * LPCREATESTRUCTW
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2075
int WINAPI GetSystemMetrics(_In_ int)
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1692
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GWL_EXSTYLE
Definition: winuser.h:851
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185