From db6974eda1dc1fada95af97ea53c369db58fda41 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Mon, 1 Jun 2020 12:03:57 +0200 Subject: replace windows version checks with compat bits this saves us from calling GetVersion() and massaging the result in hot code paths --- alf/alfbutton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'alf/alfbutton.cpp') diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp index 3c3e940..abdf162 100644 --- a/alf/alfbutton.cpp +++ b/alf/alfbutton.cpp @@ -1388,7 +1388,7 @@ ALF_ClassicButton_Create(HWND win, WORD id, int x, int y, const TCHAR *text, DWO HWND ALF_AddButton(HWND win, WORD id, int x, int y, const TCHAR *text) { - if (ALF_Compat_IsMinWindowsVersion(5, 0)) { + if (ALF_Compat_Is2k()) { return ALF_NtButton_Create(win, id, x, y, text, WS_TABSTOP); } else { return ALF_ClassicButton_Create(win, id, x, y, text, 0); @@ -1398,7 +1398,7 @@ ALF_AddButton(HWND win, WORD id, int x, int y, const TCHAR *text) HWND ALF_AddCheckbox(HWND win, WORD id, int x, int y, const TCHAR *text) { - if (ALF_Compat_IsMinWindowsVersion(5, 0)) { + if (ALF_Compat_Is2k()) { return ALF_NtButton_Create(win, id, x, y, text, WS_TABSTOP | BS_AUTOCHECKBOX); } else { return ALF_ClassicButton_Create(win, id, x, y, text, BS_AUTOCHECKBOX); @@ -1408,7 +1408,7 @@ ALF_AddCheckbox(HWND win, WORD id, int x, int y, const TCHAR *text) HWND ALF_AddRadioButton(HWND parent, WORD id, int x, int y, const TCHAR *text) { - if (ALF_Compat_IsMinWindowsVersion(5, 0)) { + if (ALF_Compat_Is2k()) { return ALF_NtButton_Create(parent, id, x, y, text, BS_AUTORADIOBUTTON); } else { return ALF_ClassicButton_Create(parent, id, x, y, text, BS_AUTORADIOBUTTON); -- cgit v1.2.3