minor changes to the group format

This commit is contained in:
freedom
2023-08-11 01:41:25 -06:00
parent 84c62213d7
commit db71fb2ab3
2 changed files with 16 additions and 18 deletions

View File

@@ -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);

View File

@@ -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;