summaryrefslogtreecommitdiff
path: root/alf/alfbutton.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/alfbutton.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/alfbutton.cpp')
-rw-r--r--alf/alfbutton.cpp6
1 files changed, 3 insertions, 3 deletions
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);