diff options
author | RadAd <adamgates84+github@gmail.com> | 2019-07-16 13:49:10 +1000 |
---|---|---|
committer | RadAd <adamgates84+github@gmail.com> | 2019-07-16 13:49:10 +1000 |
commit | 0b1db49d64bd4f50bc5bbd8e456566c77d492e11 (patch) | |
tree | 02295853ce10833d72ca3b5cbd3aef193531e50c /RadTerminalFrame.cpp | |
parent | b40b190dfdb50acd2cbb2108e92c3d4b0d7f3bfe (diff) | |
download | RadTerminal-0b1db49d64bd4f50bc5bbd8e456566c77d492e11.tar.gz RadTerminal-0b1db49d64bd4f50bc5bbd8e456566c77d492e11.zip |
Close frame on last child window close
Diffstat (limited to 'RadTerminalFrame.cpp')
-rw-r--r-- | RadTerminalFrame.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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) |