summaryrefslogtreecommitdiff
path: root/alf/alfbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfbutton.cpp')
-rw-r--r--alf/alfbutton.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp
index ce87f15..0bb0627 100644
--- a/alf/alfbutton.cpp
+++ b/alf/alfbutton.cpp
@@ -92,7 +92,6 @@ static void
ALF__Button_Render95(HWND hwnd, ALFButtonPriv *priv, LPDRAWITEMSTRUCT dis)
{
RECT r = dis->rcItem;
- DWORD v = GetVersion();
int textlen = GetWindowTextLength(hwnd);
TCHAR *textbuf = ALF_New(TCHAR, textlen + 1);
@@ -142,7 +141,7 @@ ALF__Button_Render95(HWND hwnd, ALFButtonPriv *priv, LPDRAWITEMSTRUCT dis)
style |= DT_HIDEPREFIX;
if (dis->itemState & ODS_DISABLED) {
- if (v >= 0x80000000) {
+ if (ALF_Compat_IsWin9x()) {
// Win9x just uses gray text. DSS_DISABLED is broken there, too,
// so we can't get the NT look even if we wanted to
COLORREF oldTextColor = SetTextColor(dis->hDC, GetSysColor(COLOR_GRAYTEXT));
@@ -322,7 +321,6 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT
ReleaseDC(hwnd, hdc);
} else if (uMsg == 0x2000 + WM_DRAWITEM) {
LPDRAWITEMSTRUCT dis = (DRAWITEMSTRUCT *)lParam;
- DWORD v = GetVersion();
if (!ALF_Compat_BufferedPaintRenderAnimation(hwnd, dis->hDC)) {
if (priv->hTheme) {
@@ -420,12 +418,12 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT
} else {
ALF__Button_RenderUxtheme(hwnd, priv, stateid, dis->itemState, dis->hDC, &dis->rcItem);
}
- } else if (LOBYTE(LOWORD(v)) < 4) {
- // Draw pre-95 style button
- ALF__Button_Render3x(hwnd, priv, dis);
- } else {
+ } else if (ALF_Compat_IsMinWindowsVersion(4, 0)) {
// Draw 95 style button
ALF__Button_Render95(hwnd, priv, dis);
+ } else {
+ // Draw pre-95 style button
+ ALF__Button_Render3x(hwnd, priv, dis);
}
}