aboutsummaryrefslogtreecommitdiff
path: root/c/common.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-03 16:55:03 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-03 16:55:03 +0200
commitdf88618efb32274e7b21493c48483d4761d2f9a3 (patch)
tree2c86ca67efc96e27b6fdd32a95e3bcb7ab1c90d0 /c/common.h
parent23dc657f0af27bdac887f8d18208d544cc9f010e (diff)
downloadEpisodeBrowser-df88618efb32274e7b21493c48483d4761d2f9a3.tar.gz
Load uxtheme dynamically.
In case it is not supported. If I am not mistaken, SWI-Prolog supports Windows 2000, so there is no reason why Episode Browser shouldn't.
Diffstat (limited to 'c/common.h')
-rw-r--r--c/common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/c/common.h b/c/common.h
index f011565..9d322b3 100644
--- a/c/common.h
+++ b/c/common.h
@@ -120,4 +120,16 @@ inline BOOL SetWindowRect(const HWND hWnd, const RECT r)
return SetWindowRect(hWnd, r.left, r.top, r.right, r.bottom);
}
+inline BOOL EBIsThemeActive()
+{
+ extern BOOL (*IsThemeActive)();
+ return IsThemeActive? IsThemeActive(): 0;
+}
+
+inline BOOL EBSetWindowTheme(HWND hWnd, LPCWSTR pszSubAppName, LPCWSTR pszSubIdList)
+{
+ extern BOOL (*SetWindowTheme)(HWND, LPCWSTR, LPCWSTR);
+ return SetWindowTheme? SetWindowTheme(hWnd, pszSubAppName, pszSubIdList): 0;
+}
+
#endif