diff --git a/progmgr/group.c b/progmgr/group.c index 76740fd..0a25302 100644 --- a/progmgr/group.c +++ b/progmgr/group.c @@ -2,7 +2,7 @@ GROUP.C - Copyright (c) 2023 freedom7341, Vortesys DESCRIPTION - - Group window and program item functions. + Group window and program group/item functions. LICENSE INFORMATION - MIT License, see LICENSE.txt in the root folder \* * * * * * * */ @@ -15,6 +15,9 @@ // #define WIN32_LEAN_AND_MEAN #include +/* Variables */ +WNDCLASSEX wcGrp; + /* Functions */ /* * * *\ @@ -31,13 +34,21 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa { break; } - default: -// GrpProcDefault: + default: +// GroupProcDefault: return DefMDIChildProc(hWnd, message, wParam, lParam); } return 0; } +/* * * *\ + InitGroups - + Initialize variables for the betterment of groups forever + Make great glorious MDI Client + RETURNS - + Zero if nothing, otherwise returns the good stuff. +\* * * */ + /* * * *\ TempCreateGroup - th @@ -53,7 +64,7 @@ HWND TempCreateGroup(HWND hMDIClient) mcs.szTitle = L""; mcs.hOwner = hAppInstance; mcs.x = mcs.y = mcs.cx = mcs.cy = CW_USEDEFAULT; - mcs.style = WS_VSCROLL | WS_HSCROLL; + mcs.style = WS_VISIBLE; hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs); // if (!hChild) @@ -62,4 +73,4 @@ HWND TempCreateGroup(HWND hMDIClient) // MB_ICONEXCLAMATION | MB_OK); // } return hChild; -} \ No newline at end of file +} diff --git a/progmgr/group.h b/progmgr/group.h index 412994d..64bb276 100644 --- a/progmgr/group.h +++ b/progmgr/group.h @@ -2,7 +2,7 @@ GROUP.H - Copyright (c) 2023 freedom7341, Vortesys DESCRIPTION - - Program group and item structures and... stuff. + Program group/item structures, functions and definitons LICENSE INFORMATION - MIT License, see LICENSE.txt in the root folder \* * * * * * * */ @@ -13,6 +13,58 @@ /* Includes */ #include +/* Definitions */ +#define MAX_GROUPS 512 +#define MAX_ITEMS 512 +#define MAX_TITLE_LENGTH MAX_PATH +// Group Format Definitions +#define GRP_SIGNATURE 0x47324D50L // PM2G +// Group Flag Values (DWORD) +#define GRP_FLAG_COMMON 0x00000001 +#define GRP_FLAG_READONLY 0x00000002 +#define GRP_FLAG_MINIMIZED 0x00000004 +#define GRP_FLAG_MAXIMIZED 0x00000008 + +/* Structures */ +// Group format, .GRP +typedef struct _GROUP { + // Group file header + 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; + + // Items + WORD cItems; // Number of items + PITEM iItems; // Array of items +} GROUP, * PGROUP; + +// Group window information +typedef struct _GROUPWND { + // Window information + HWND hWndGroup; + RECT rcGroup; // Window rectangle + + // Group information + HANDLE hGroup; // Handle to GROUP object +} GROUPINFO, * PGROUPINFO; + +// Item Structure +typedef struct _ITEM { + // Item executable and name + WCHAR szItemName[MAX_TITLE_LENGTH]; + WCHAR szExecPath[MAX_PATH]; // Path of the item executable + WCHAR szWorkPath[MAX_PATH]; // Working directory + + // Icon + WCHAR szIconPath[MAX_PATH]; // Path of the icon + UINT uiIconIndex; // Index of the icon +} ITEM, * PITEM; + /* Function Prototypes */ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -HWND TempCreateGroup(HWND hMDIClient); \ No newline at end of file +HWND TempCreateGroup(HWND hMDIClient);