diff --git a/.gitignore b/.gitignore index 1b9c19f..2728a7d 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ dkms.conf /planning /progmgr/RCa10968 /progmgr/icons/Thumbs.db +/bin/ diff --git a/README.md b/README.md index c24919a..9e54216 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Latest version](https://img.shields.io/github/v/release/Freedom-Desktop/Program-Manager-II?label=latest%20version&sort=semver&style=plastic)](/releases) [![Latest pre-release version](https://img.shields.io/github/v/release/Freedom-Desktop/Program-Manager-II?label=latest%20pre-release%20version&sort=semver&style=plastic&include_prereleases)](/releases) # Program Manager *II* for Windows NT -![Progman banner](/misc/banner.png) +![Progman banner](/misc/progmgr.png) ## What is Program Manager? Program Manager was the shell that shipped with Microsoft Windows by default from Windows 3.0/NT 3.1 to 3.11/NT 3.51. The Program Manager shell was included with Windows as an option until Windows 2000. The new Program Manager is a shell that aims to mimic the original desktop metaphor that the original Program Manager was designed for while adding modern amenities. diff --git a/misc/banner.png b/misc/banner.png index d4eecfc..ceebc16 100644 Binary files a/misc/banner.png and b/misc/banner.png differ diff --git a/misc/progmgr.png b/misc/progmgr.png index 2efcace..e5eaea4 100644 Binary files a/misc/progmgr.png and b/misc/progmgr.png differ diff --git a/misc/progmgr1.gif b/misc/progmgr1.gif new file mode 100644 index 0000000..9fb8525 Binary files /dev/null and b/misc/progmgr1.gif differ diff --git a/misc/progmgr1.txt b/misc/progmgr1.txt new file mode 100644 index 0000000..289ae9f Binary files /dev/null and b/misc/progmgr1.txt differ diff --git a/misc/progmgr2.gif b/misc/progmgr2.gif new file mode 100644 index 0000000..c75a0a2 Binary files /dev/null and b/misc/progmgr2.gif differ diff --git a/misc/progmgr2.txt b/misc/progmgr2.txt new file mode 100644 index 0000000..5564bca --- /dev/null +++ b/misc/progmgr2.txt @@ -0,0 +1,40 @@ + ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +ÉØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»³ +º³ÜÜÜÜÜÜÜ ÜÜÜÜÜÜÜÜÜÜÜܺ³ +º³ ÛÛ ÛÛ ßÛÛÛßßÛÛÛß º³ +º³ ÛÛ ÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛßßßß ÜÜÜ ÜÜ ÜÜÜÜ ÜÜÜÜÜ ÜÜÜ ÜÜ ÜÜÜÜ ÜÜÜ ÜÜ ÜÜÜ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ÛÛÛßÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛßÛ ßß ÛÛ ÛÛÛßÛÛÛßÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÜÛßßÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛ ÛÛÛ º³ +º³ßßßß ßßßß ßßßß ßÛÛÛÛ ßßßß ßßßßß ßßßß ßß ßßß ÛÛÛ ÛÛÛ º³ +º³ÜÜÜÜ ÜÜÜÜ ÛÛ ÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ÛÛ ßßßß ÛÛÛ ÛÛÛ º³ +º³ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛßÛ ÛßÛÛ ÜÜÜÜ ÜÜÜ ÜÜ ÜÜÜÜ ÜÜÜÜÜ ÜÜÜÜ ÜÜÜ ÜÜ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ßÛÛß ÛÛ ßß ÛÛ ÛÛÛßÛÛ ßß ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛßÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ßß ÛÛ ÜÛßßÛÛ ÛÛ ÛÛ ÜÛßßÛÛ ÛÛ ÛÛ ÛÛßßßß ÛÛ ÛÛÛ ÛÛÛ º³ +º³ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÜÜ ÛÛ ÜÛÛÛÜÜÛÛÛÜ º³ +º³ßßßß ßßßß ßßßßß ßßß ßß ßßßßß ßÛÛÛÛ ßßßß ßßßß ßßßßßßßßßßßߺ³ +ºÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ÛÛ ÛÛÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ×Ù +ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͸ßßßßÕÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ + + + + + + + + + + + + + + + + + + + + diff --git a/progmgr/icons/progman.ico b/progmgr/icons/progmgr.ico similarity index 100% rename from progmgr/icons/progman.ico rename to progmgr/icons/progmgr.ico diff --git a/progmgr/icons/src/progmanG.pdn b/progmgr/icons/src/progmanG.pdn deleted file mode 100644 index 38677f2..0000000 Binary files a/progmgr/icons/src/progmanG.pdn and /dev/null differ diff --git a/progmgr/icons/src/progmanM.pdn b/progmgr/icons/src/progmanM.pdn deleted file mode 100644 index c993602..0000000 Binary files a/progmgr/icons/src/progmanM.pdn and /dev/null differ diff --git a/progmgr/icons/src/progmanT.pdn b/progmgr/icons/src/progmanT.pdn deleted file mode 100644 index 2a9e9fe..0000000 Binary files a/progmgr/icons/src/progmanT.pdn and /dev/null differ diff --git a/progmgr/icons/src/progman.ico b/progmgr/icons/src/progmgr.ico similarity index 100% rename from progmgr/icons/src/progman.ico rename to progmgr/icons/src/progmgr.ico diff --git a/progmgr/icons/src/progman.pdn b/progmgr/icons/src/progmgr.pdn similarity index 100% rename from progmgr/icons/src/progman.pdn rename to progmgr/icons/src/progmgr.pdn diff --git a/progmgr/icons/src/wfdir.pdn b/progmgr/icons/src/wfdir.pdn new file mode 100644 index 0000000..c544c49 Binary files /dev/null and b/progmgr/icons/src/wfdir.pdn differ diff --git a/progmgr/icons/src/wftrdir.pdn b/progmgr/icons/src/wftrdir.pdn new file mode 100644 index 0000000..8319709 Binary files /dev/null and b/progmgr/icons/src/wftrdir.pdn differ diff --git a/progmgr/icons/src/wftree.pdn b/progmgr/icons/src/wftree.pdn new file mode 100644 index 0000000..909036b Binary files /dev/null and b/progmgr/icons/src/wftree.pdn differ diff --git a/progmgr/lang/dlg_en-US.rc b/progmgr/lang/dlg_en-US.rc index 4d93d63..0ae26ae 100644 Binary files a/progmgr/lang/dlg_en-US.rc and b/progmgr/lang/dlg_en-US.rc differ diff --git a/progmgr/lang/res_en-US.rc b/progmgr/lang/res_en-US.rc index 2d01a7a..c0bf2fb 100644 Binary files a/progmgr/lang/res_en-US.rc and b/progmgr/lang/res_en-US.rc differ diff --git a/progmgr/progmgr.c b/progmgr/progmgr.c index 8236c59..026090b 100644 --- a/progmgr/progmgr.c +++ b/progmgr/progmgr.c @@ -6,3 +6,116 @@ LICENSE INFORMATION - MIT License, see LICENSE.txt in the root folder \* * * * * * * */ + +/* Headers */ +#include "progmgr.h" +#include "resource.h" +#include "registry.h" +// #define WIN32_LEAN_AND_MEAN +#include + +/* Variables */ +// Miscellaneous +BOOL bIsDefaultShell = FALSE; +// Window Related +HICON hProgMgrIcon = NULL; +HINSTANCE hAppInstance; +HWND hwndProgMgr = NULL; +HWND hwndMDIClient = NULL; +// Global Strings +WCHAR szAppTitle[32]; + +/* Registry Keys */ + +// ... +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + +/* Program Entry Point */ +int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) +{ + MSG msg = { 0 }; + WNDCLASS wc = { 0 }; + WCHAR szClass[16]; + + hAppInstance = hInstance; + + // Create Important Strings + LoadString(hAppInstance, IDS_APPTITLE, szAppTitle, CharSizeOf(szAppTitle)); + LoadString(hAppInstance, IDS_PMCLASS, szClass, CharSizeOf(szClass)); + + // And add Task Manager... + // LoadString(hAppInstance, IDS_TASKMGR, szBuffer, CharSizeOf(szBuffer)); + // InsertMenu(hSystemMenu, 6, MF_BYPOSITION | MF_STRING, IDM_TASKMGR, szBuffer); + + // Register the Frame Window + wc.lpfnWndProc = WndProc; + wc.hInstance = hAppInstance; + wc.hIcon = hProgMgrIcon = LoadImage(hAppInstance, MAKEINTRESOURCE(PROGMGRICON), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_SHARED); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND); + wc.lpszMenuName = MAKEINTRESOURCE(IDM_MAIN); + wc.lpszClassName = szClass; + if (!RegisterClass(&wc)) + return 1; + + InitializeRegistryKeys(); + + if (!CreateWindow(wc.lpszClassName, + szAppTitle, + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, 0, 0, hInstance, NULL)) + return 2; + + while (GetMessage(&msg, NULL, 0, 0) > 0) + DispatchMessage(&msg); + + return 0; +} + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + + switch (message) + { + case WM_CREATE: + { + RECT rc; + CLIENTCREATESTRUCT ccs; + + hwndProgMgr = hWnd; + + // ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), IDM_WINDOW); + // ccs.idFirstChild = IDM_CHILDSTART; + + GetClientRect(hwndProgMgr, &rc); + + hwndMDIClient = CreateWindow(TEXT("MDIClient"), + NULL, + WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_BORDER, + rc.left - 1, rc.top - 1, + rc.right + 2, rc.bottom + 2, + hWnd, (HMENU)1, hAppInstance, + (LPTSTR)&ccs); + if (!hwndMDIClient) { + return -1; + } + + break; + } + //case WM_SYSCOMMAND: + //{ + // if (wParam == IDM_TASKMGR) { + //ShellExecute(hwndProgMgr, &TEXT("OPEN\0"), &TEXT("TASKMGR.EXE\0"), NULL, NULL, SW_NORMAL); + // break; + // } + //break; + //} + case WM_CLOSE: + PostQuitMessage(0); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + return 0; + +} diff --git a/progmgr/progmgr.h b/progmgr/progmgr.h index 5e2cf2f..4da7301 100644 --- a/progmgr/progmgr.h +++ b/progmgr/progmgr.h @@ -7,4 +7,12 @@ MIT License, see LICENSE.txt in the root folder \* * * * * * * */ +/* Pragmas */ #pragma once +#pragma comment(linker,"\"/manifestdependency:type='win32' \ +name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ +processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") + +/* Macros and Defines */ +#define CharSizeOf(x) (sizeof(x) / sizeof(*x)) + diff --git a/progmgr/progmgr.vcxproj b/progmgr/progmgr.vcxproj index 95fa26a..ddba5f3 100644 --- a/progmgr/progmgr.vcxproj +++ b/progmgr/progmgr.vcxproj @@ -70,6 +70,22 @@ + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(OutDir) + + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(OutDir) + + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(OutDir) + + + $(SolutionDir)\bin\$(Platform)\$(Configuration)\ + $(OutDir) + Level3 @@ -80,6 +96,8 @@ Windows true + $(OutDir)$(TargetName)$(TargetExt) + 5.02 @@ -96,6 +114,8 @@ true true true + $(OutDir)$(TargetName)$(TargetExt) + 5.02 @@ -108,6 +128,8 @@ Windows true + $(OutDir)$(TargetName)$(TargetExt) + 5.02 @@ -124,13 +146,18 @@ true true true + $(OutDir)$(TargetName)$(TargetExt) + 5.02 + + + diff --git a/progmgr/progmgr.vcxproj.filters b/progmgr/progmgr.vcxproj.filters index 92e5d74..5ffe778 100644 --- a/progmgr/progmgr.vcxproj.filters +++ b/progmgr/progmgr.vcxproj.filters @@ -21,11 +21,20 @@ Header Files + + Header Files + + + Header Files + Source Files + + Source Files + diff --git a/progmgr/registry.c b/progmgr/registry.c new file mode 100644 index 0000000..4b7b0e0 --- /dev/null +++ b/progmgr/registry.c @@ -0,0 +1,33 @@ +/* * * * * * * *\ + REGISTRY.C - + Copyright (c) 2023 freedom7341, Freedom Desktop + DESCRIPTION - + Program Manager's registry related functions. + LICENSE INFORMATION - + MIT License, see LICENSE.txt in the root folder +\* * * * * * * */ + +/* Headers */ +#include "registry.h" +// #define WIN32_LEAN_AND_MEAN +#include + +/* Functions */ + +/* * * *\ + InitializeRegistryKeys - + Takes the relevant Registry Keys and turns them + into valid and usable handles. + RETURNS - + True if successful, false if unsuccessful. +\* * * */ +BOOL InitializeRegistryKeys() +{ + HKEY hkeyProgramManager; + //HKEY hkeyPMSettings; + + if (!RegCreateKeyEx(HKEY_CURRENT_USER, PROGMGR_KEY, 0, 0, 0, KEY_READ | KEY_WRITE, NULL, &hkeyProgramManager, NULL)) { + return TRUE; + } + return FALSE; +} \ No newline at end of file diff --git a/progmgr/registry.h b/progmgr/registry.h new file mode 100644 index 0000000..7f39a4e --- /dev/null +++ b/progmgr/registry.h @@ -0,0 +1,27 @@ +/* * * * * * * *\ + REGISTRY.H - + Copyright (c) 2023 freedom7341, Freedom Desktop + DESCRIPTION - + Program Manager's header file for registry related functions. + LICENSE INFORMATION - + MIT License, see LICENSE.txt in the root folder +\* * * * * * * */ + +/* Pragmas */ +#pragma once + +/* Includes */ +#include + +/* Defines */ +#define PROGMAN_KEY L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Program Manager" +#define WINDOWS_KEY L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows" +#define PROGMGR_KEY L"Software\\Freedom Desktop\\Program Manager II" +#define REGKEYMAXLENGTH 261 + +/* Global Registry Keys */ +//HKEY hkeyProgramManager; +//HKEY hkeyPMSettings; + +/* Function Prototypes */ +BOOL InitializeRegistryKeys(VOID); diff --git a/progmgr/resource.h b/progmgr/resource.h new file mode 100644 index 0000000..bf42fc1 Binary files /dev/null and b/progmgr/resource.h differ diff --git a/progmgr/resource.rc b/progmgr/resource.rc index 59e3e1e..d0f9606 100644 Binary files a/progmgr/resource.rc and b/progmgr/resource.rc differ diff --git a/progmgr/version.inc b/progmgr/version.inc index 90dc232..d8fb5f6 100644 Binary files a/progmgr/version.inc and b/progmgr/version.inc differ