From 0b1db49d64bd4f50bc5bbd8e456566c77d492e11 Mon Sep 17 00:00:00 2001 From: RadAd Date: Tue, 16 Jul 2019 13:49:10 +1000 Subject: Close frame on last child window close --- RadTerminalFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'RadTerminalFrame.cpp') diff --git a/RadTerminalFrame.cpp b/RadTerminalFrame.cpp index 84a0789..f58c2d7 100644 --- a/RadTerminalFrame.cpp +++ b/RadTerminalFrame.cpp @@ -6,6 +6,7 @@ #define PROJ_NAME TEXT("RadTerminal") #define PROJ_CODE TEXT("RadTerminal") +#define REG_BASE TEXT("Software\\RadSoft\\") PROJ_CODE HWND ActionNewWindow(HWND hWnd, bool bParseCmdLine, const std::tstring& profile); LRESULT CALLBACK RadTerminalMDIFrameProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); @@ -66,9 +67,9 @@ BOOL RadTerminalFrameOnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct) { HKEY hMainKey = NULL; - if (RegOpenKey(HKEY_CURRENT_USER, TEXT("Software\\RadSoft\\" PROJ_CODE "\\Profiles"), &hMainKey) == ERROR_SUCCESS) + if (RegOpenKey(HKEY_CURRENT_USER, REG_BASE TEXT("\\Profiles"), &hMainKey) == ERROR_SUCCESS) { - const std::tstring strDefault = RegGetString(HKEY_CURRENT_USER, TEXT("Software\\RadSoft\\" PROJ_CODE), TEXT("Profile"), TEXT("Cmd")); + const std::tstring strDefault = RegGetString(HKEY_CURRENT_USER, REG_BASE, TEXT("Profile"), TEXT("Cmd")); DWORD i = 0; std::tstring strName; for (int i = 0; RegEnumKeyEx(hMainKey, i, strName); ++i) -- cgit v1.2.3