[COMCTL32][USER32] Button: Fix DLGC_... handling (#6168)

Based on KRosUser's button.patch.
- Fix DLGC_... handling by using & operator
  in BUTTON_CheckAutoRadioButton
  in button.c.
- Fix DLGC_... handling by using & operator
  in IsDialogMessageW in dialog.c.
- BM_CLICK's wParam must be zero.
CORE-17210
This commit is contained in:
Katayama Hirofumi MZ
2023-12-16 09:29:13 +09:00
committed by GitHub
parent 8ab2e5a28a
commit d55add359c
3 changed files with 9 additions and 3 deletions

View File

@@ -1667,7 +1667,7 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd )
{
if (!sibling) break;
#ifdef __REACTOS__
if (SendMessageW( sibling, WM_GETDLGCODE, 0, 0 ) == (DLGC_BUTTON | DLGC_RADIOBUTTON))
if ((SendMessageW(sibling, WM_GETDLGCODE, 0, 0) & (DLGC_BUTTON | DLGC_RADIOBUTTON)) == (DLGC_BUTTON | DLGC_RADIOBUTTON))
SendMessageW( sibling, BM_SETCHECK, sibling == hwnd ? BST_CHECKED : BST_UNCHECKED, 0 );
#else
if ((hwnd != sibling) &&