summaryrefslogtreecommitdiff
path: root/alf/alfcombobox.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-01 12:03:57 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-01 12:03:57 +0200
commitdb6974eda1dc1fada95af97ea53c369db58fda41 (patch)
treee9ab96b1b8020e490f2e8d54757e1f1988d69f22 /alf/alfcombobox.cpp
parent79e8eb033fd2742b67966f5ff973f4ef64005531 (diff)
replace windows version checks with compat bits
this saves us from calling GetVersion() and massaging the result in hot code paths
Diffstat (limited to 'alf/alfcombobox.cpp')
-rw-r--r--alf/alfcombobox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/alf/alfcombobox.cpp b/alf/alfcombobox.cpp
index 5350a2a..349bd40 100644
--- a/alf/alfcombobox.cpp
+++ b/alf/alfcombobox.cpp
@@ -252,7 +252,7 @@ ALF_Combo_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessage(priv->hwndChild, CB_SETEDITSEL, 0, (LPARAM)sel);
int heightOffset = 0;
- if (ALF_Compat_IsMinWindowsVersion(4, 0)) {
+ if (ALF_Compat_Is40()) {
heightOffset = - 2*ALF_Compat_GetSystemMetricsForDpi(
SM_CYEDGE, (UINT)priv->dpi)
- 2;
@@ -284,7 +284,7 @@ ALF_Combo_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
- if (!ALF_Compat_IsMinWindowsVersion(4, 0)) {
+ if (!ALF_Compat_Is40()) {
// HACK to draw the space between edit control and button as COLOR_BTNFACE
if (uMsg == WM_CTLCOLORLISTBOX && priv && !(GetWindowLong(priv->hwndChild, GWL_STYLE) & 1)) {
SetTextColor((HDC)wParam, GetSysColor(COLOR_BTNTEXT));