summaryrefslogtreecommitdiff
path: root/alf/alfcompat.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-01 22:21:16 +0100
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-01 22:21:16 +0100
commit4bd97888be6d5967d5b9d3ad9f33860c4067d32c (patch)
tree928349854e244a25de291f58adb3b472227ad60e /alf/alfcompat.h
parent261902fcae887249ffa03114e49afdef85fb4442 (diff)
fix embarrassing bug wrt High-DPI fonts
Diffstat (limited to 'alf/alfcompat.h')
-rw-r--r--alf/alfcompat.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/alf/alfcompat.h b/alf/alfcompat.h
index 846590c..ba315e1 100644
--- a/alf/alfcompat.h
+++ b/alf/alfcompat.h
@@ -17,6 +17,35 @@ typedef struct {
} ALFCompatFunctions;
+typedef struct {
+ UINT cbSize;
+ int iBorderWidth;
+ int iScrollWidth;
+ int iScrollHeight;
+ int iCaptionWidth;
+ int iCaptionHeight;
+ LOGFONT lfCaptionFont;
+ int iSmCaptionWidth;
+ int iSmCaptionHeight;
+ LOGFONT lfSmCaptionFont;
+ int iMenuWidth;
+ int iMenuHeight;
+ LOGFONT lfMenuFont;
+ LOGFONT lfStatusFont;
+ LOGFONT lfMessageFont;
+ int iPaddedBorderWidth; // new in Vista
+} ALF_NONCLIENTMETRICS_VISTA;
+
+static inline SIZE_T
+ALF_SizeOf_NONCLIENTMETRICS(void)
+{
+ if (LOBYTE(LOWORD(GetVersion())) >= 6) {
+ return sizeof(ALF_NONCLIENTMETRICS_VISTA);
+ } else {
+ return sizeof(ALF_NONCLIENTMETRICS_VISTA) - sizeof(int);
+ }
+}
+
ALFCompatFunctions *
ALF_CreateCompatFuncTable(void);