From db71fb2ab3b20bbccc9c8020e857b6b6061bb0e9 Mon Sep 17 00:00:00 2001 From: freedom Date: Fri, 11 Aug 2023 01:41:25 -0600 Subject: [PATCH] minor changes to the group format --- progmgr/group.c | 19 +++++++------------ progmgr/group.h | 15 +++++++++------ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/progmgr/group.c b/progmgr/group.c index a32a4c2..2bddbb1 100644 --- a/progmgr/group.c +++ b/progmgr/group.c @@ -160,16 +160,13 @@ DWORD GetGroupFlags(PGROUPWND pgw) SaveGroup - Saves group from a group window into a GROUP structure. - INFO - - This function operates under the - assumption that the GROUP structure - doesn't get modified over the course - of the MDI window's life and we can't - just grab the structure directly and - expect it to be updated. + ABSTRACT - + This function will extract all of the + necessary information from a group window + in order to produce a group structure. RETURNS - Formatted GROUP structure. - Otherwise NULL if failure. + Upon failure, wChecksum will be 0. \* * * */ GROUP SaveGroup(PGROUPWND pgw) { @@ -192,10 +189,8 @@ GROUP SaveGroup(PGROUPWND pgw) // Get the window handle as well hWndGrp = pgw->hWndGroup; - // Set the group header information - grp.dwSignature = GRP_SIGNATURE; - grp.wVersion = GRP_VERSION; - grp.wChecksum = 0; // NOTE: implement this later lol + // Set the group checksum + grp.wChecksum = 1; // NOTE: implement this for real later lol // Copy group information GetWindowText(hWndGrp, szName, MAX_TITLE_LENGTH); diff --git a/progmgr/group.h b/progmgr/group.h index 68e8d35..7e1c7a0 100644 --- a/progmgr/group.h +++ b/progmgr/group.h @@ -33,7 +33,10 @@ typedef struct _ITEM { WCHAR szItemName[MAX_TITLE_LENGTH]; WCHAR szExecPath[MAX_PATH]; // Path of the executable WCHAR szWorkPath[MAX_PATH]; // Working directory - + // Item flags + int nCmdShow; // Start application minimized + UINT uiHotkeyModifiers; + UINT uiHotkeyVirtualKey; // Icon WCHAR szIconPath[MAX_PATH]; UINT uiIconIndex; @@ -45,12 +48,13 @@ typedef struct _GROUP { DWORD dwSignature; // Set to GRP_SIGNATURE WORD wVersion; // Group format version WORD wChecksum; - // Group information WCHAR szGroupName[MAX_TITLE_LENGTH]; DWORD dwFlags; // Use with GRP_FLAG_* values. FILETIME ftLastWrite; - + // Icon + WCHAR szIconPath[MAX_PATH]; + UINT uiIconIndex; // Items WORD cItems; // Number of items PITEM iItems; // Array of items @@ -58,10 +62,9 @@ typedef struct _GROUP { // Group window information typedef struct _GROUPWND { - // Window information + // Window HWND hWndGroup; - - // Group information + // Group PGROUP pGroup; // Pointer to GROUP structure } GROUPWND, * PGROUPWND;