added manifest, renamed the run dialog function

This commit is contained in:
freedom
2023-07-21 01:37:36 -06:00
parent 292b58be46
commit 8a2a2c6d21
8 changed files with 95 additions and 9 deletions

View File

@@ -43,11 +43,12 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
HMENU hMenu;
HMENU hSystemMenu;
WNDCLASS wc = { 0 };
WCHAR szBuffer[256];
WCHAR szBuffer[MAX_PATH];
WCHAR szClass[16];
WCHAR szUsername[UNLEN + 1] = L"";
DWORD dwUsernameLen = UNLEN;
WCHAR szWindowTitle[UNLEN + ARRAYSIZE(szAppTitle) + 4] = L"";
RECT rWorkArea;
hAppInstance = hInstance;
@@ -99,7 +100,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
hSystemMenu = GetSystemMenu(hWndProgMgr, FALSE);
if (bIsDefaultShell) {
// Do all the fun stuff since we're the default shell
// Modify the context menus since we're the default shell
DeleteMenu(hSystemMenu, SC_CLOSE, MF_BYCOMMAND);
LoadString(hAppInstance, IDS_SHUTDOWN, szBuffer, ARRAYSIZE(szBuffer));
@@ -111,6 +112,14 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
LoadString(hAppInstance, IDS_TASKMGR, szBuffer, ARRAYSIZE(szBuffer));
InsertMenu(hSystemMenu, 6, MF_BYPOSITION | MF_STRING, IDM_TASKMGR, szBuffer);
// Refresh the wallpaper...
SystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, szBuffer, 0);
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, szBuffer, SPIF_SENDCHANGE);
// Reset the work area (removes dead-space after switching from another shell)
// May have unintended consequences.
SystemParametersInfo(SPI_SETWORKAREA, 0, (PVOID)&rWorkArea, SPIF_SENDCHANGE);
}
while (GetMessage(&msg, NULL, 0, 0) > 0)