From 057d978fcbf6b03ff8d6a080d203a7090779ed1c Mon Sep 17 00:00:00 2001 From: Ahmed Arif Date: Mon, 16 Mar 2026 13:01:44 +0100 Subject: [PATCH] [USER32] button.c Fix extra-byte layout on x64 (#8733) One visible case is the setup LiveCD error dialog, where the message box button can appear with a wrong bold/garbled look instead of the normal default-pushbutton appearance. ## Root cause `win32ss/user/user32/controls/button.c` stores button state with `GetWindowLongPtrW` / `SetWindowLongPtrW`, but the control extra-byte layout was still defined as if the first slot were only `sizeof(LONG)` On 64-bit builds, that causes the stored state to overlap the cached font, image, and UI-state fields. --- win32ss/user/user32/controls/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/user/user32/controls/button.c b/win32ss/user/user32/controls/button.c index 95d98e4e9d7..243a137f0f9 100644 --- a/win32ss/user/user32/controls/button.c +++ b/win32ss/user/user32/controls/button.c @@ -157,12 +157,12 @@ const struct builtin_class_descr BUTTON_builtin_class = static inline LONG get_button_state( HWND hwnd ) { - return GetWindowLongPtrW( hwnd, STATE_GWL_OFFSET ); + return GetWindowLongW( hwnd, STATE_GWL_OFFSET ); } static inline void set_button_state( HWND hwnd, LONG state ) { - SetWindowLongPtrW( hwnd, STATE_GWL_OFFSET, state ); + SetWindowLongW( hwnd, STATE_GWL_OFFSET, state ); } #ifdef __REACTOS__