[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.
This commit is contained in:
Ahmed Arif
2026-03-16 13:01:44 +01:00
committed by GitHub
parent 3bbdfb932a
commit 057d978fcb

View File

@@ -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__