summaryrefslogtreecommitdiff
path: root/alf/alfcompat.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-14 16:02:05 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-14 16:02:05 +0200
commit0948993ec9e08e170d1d22f2c7176b00bd987103 (patch)
tree1f707d95bfbbef467dbce2ecc0b3e9c034c9cd4c /alf/alfcompat.h
parent29393896e21cab201646352cce017992cf0b2ddb (diff)
Make notebook bg gradient work. Anti-flicker work throughout the codebase.
Diffstat (limited to 'alf/alfcompat.h')
-rw-r--r--alf/alfcompat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/alf/alfcompat.h b/alf/alfcompat.h
index 9c7f3f2..3996309 100644
--- a/alf/alfcompat.h
+++ b/alf/alfcompat.h
@@ -15,6 +15,15 @@ extern IMAGE_DOS_HEADER __ImageBase;
#endif
#define ALF_HINSTANCE ((HINSTANCE)&__ImageBase)
+static inline BOOL ALF_Compat_IsMinWindowsVersion(DWORD major, DWORD minor)
+{
+ DWORD v = GetVersion();
+ DWORD vMajor = LOBYTE(LOWORD(v));
+ DWORD vMinor = HIBYTE(LOWORD(v));
+
+ return vMajor > major || (vMajor == major && vMinor >= minor);
+}
+
typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR);
typedef struct {