diff options
author | RadAd <adamgates84+github@gmail.com> | 2019-07-15 16:39:00 +1000 |
---|---|---|
committer | RadAd <adamgates84+github@gmail.com> | 2019-07-15 16:39:00 +1000 |
commit | a1dd103887ff7e6b6881716da495b4e57ed754c0 (patch) | |
tree | e4ec9da83222e0afebe8427c578aa6a78cf5f61b /WinUtils.h | |
parent | 3fc27865c71d09f7016c895e57c9abbec09e9536 (diff) | |
download | RadTerminal-a1dd103887ff7e6b6881716da495b4e57ed754c0.tar.gz RadTerminal-a1dd103887ff7e6b6881716da495b4e57ed754c0.zip |
Use registry setting for MDI mode
Diffstat (limited to 'WinUtils.h')
-rw-r--r-- | WinUtils.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -128,6 +128,16 @@ inline DWORD RegGetDWORD(HKEY hKey, LPCTSTR sValue, DWORD dwDef) return dwDef; } +inline DWORD RegGetDWORD(HKEY hKey, LPCTSTR sSubKey, LPCTSTR sValue, DWORD dwDef) +{ + DWORD data = 0; + DWORD len = sizeof(data); + if (RegGetValue(hKey, sSubKey, sValue, RRF_RT_REG_DWORD, nullptr, &data, &len) == ERROR_SUCCESS) + return data; + else + return dwDef; +} + inline HWND GetMDIClient(HWND hWnd) { return FindWindowEx(hWnd, NULL, TEXT("MDICLIENT"), nullptr); |