Solve issue #11

This commit is contained in:
Brady McDermott
2024-10-21 16:06:39 -06:00
parent ca4b30e1d7
commit 9c6fe40c1c

View File

@@ -69,12 +69,13 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
HANDLE hAccel;
HMENU hMenu;
HMENU hSystemMenu;
HWND hOldProgMgr;
WNDCLASS wc = { 0 };
WCHAR szBuffer[MAX_PATH];
RECT rcRoot;
POINT ptOffset = { 0 };
// Initialize the instance
// Grab the instance
g_hAppInstance = hInstance;
// Create Strings
@@ -82,6 +83,16 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
LoadString(g_hAppInstance, IDS_APPTITLE, g_szAppTitle, ARRAYSIZE(g_szAppTitle));
LoadString(g_hAppInstance, IDS_WEBSITE, g_szWebsite, ARRAYSIZE(g_szWebsite));
// Lazily search for another instance of Program Manager
// If we find one, switch focus to it and then abort.
hOldProgMgr = FindWindowEx(NULL, NULL, g_szClass, NULL);
if (hOldProgMgr != NULL)
{
SwitchToThisWindow(hOldProgMgr, FALSE);
return FALSE;
}
// Get Desktop background color
//CreateSolidBrush(GetBackgroundColor