formatting

This commit is contained in:
freedom
2023-07-22 00:33:16 -06:00
parent bb45f056ba
commit 34fae5033b
3 changed files with 40 additions and 12 deletions

View File

@@ -79,13 +79,20 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
return FALSE;
bIsDefaultShell = IsProgMgrDefaultShell();
LoadConfig();
// Add username to window title
GetUserNameEx(NameSamCompatible, szUsername, &dwUsernameLen);\
GetUserNameEx(NameSamCompatible, szUsername, &dwUsernameLen);
StringCchCopy(szWindowTitle, ARRAYSIZE(szAppTitle), szAppTitle);
StringCchCat(szWindowTitle, ARRAYSIZE(szWindowTitle), L" - ");
StringCchCat(szWindowTitle, ARRAYSIZE(szWindowTitle), szUsername);
if (bShowUsername)
{
StringCchCat(szWindowTitle, ARRAYSIZE(szWindowTitle), L" - ");
StringCchCat(szWindowTitle, ARRAYSIZE(szWindowTitle), szUsername);
}
if (!CreateWindow(wc.lpszClassName,
szWindowTitle,
@@ -97,7 +104,16 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
hMenu = GetMenu(hWndProgMgr);
hSystemMenu = GetSystemMenu(hWndProgMgr, FALSE);
if (bIsDefaultShell) {
// Use our configuration to update our menu checkmarks
if (bAutoArrange)
CheckMenuItem(hMenu, IDM_OPTIONS_AUTOARRANGE, MF_CHECKED);
if (bMinOnRun)
CheckMenuItem(hMenu, IDM_OPTIONS_MINONRUN, MF_CHECKED);
if (bSaveSettings)
CheckMenuItem(hMenu, IDM_OPTIONS_SAVESETTINGS, MF_CHECKED);
if (bIsDefaultShell)
{
// Modify the context menus since we're the default shell
DeleteMenu(hSystemMenu, SC_CLOSE, MF_BYCOMMAND);