aboutsummaryrefslogtreecommitdiff
path: root/WinUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'WinUtils.h')
-rw-r--r--WinUtils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/WinUtils.h b/WinUtils.h
index 4f544a1..ffd3929 100644
--- a/WinUtils.h
+++ b/WinUtils.h
@@ -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);