mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 07:40:09 +08:00
[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:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user