[COMCTL32][USER32] RadioButton: Notify BN_CLICKED on WM_SETFOCUS (#6266)

Based on KRosUser's button_fixnotif.patch.
JIRA issue: CORE-6542, CORE-19384
Notify BN_CLICKED to the parent on WM_SETFOCUS message
handling if the button type was either BS_RADIOBUTTON or
BS_AUTORADIOBUTTON, and if the button was unchecked.
This commit is contained in:
Katayama Hirofumi MZ 2024-01-01 11:01:59 +09:00 committed by GitHub
parent a842a92260
commit d6c70f0864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -1043,6 +1043,13 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
paint_button( infoPtr, btn_type, ODA_FOCUS );
if (style & BS_NOTIFY)
BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS);
#ifdef __REACTOS__
if (((btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON)) &&
!(infoPtr->state & BST_CHECKED))
{
BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED);
}
#endif
break;
case WM_KILLFOCUS:

View file

@ -532,6 +532,13 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
paint_button( hWnd, btn_type, ODA_FOCUS );
if (style & BS_NOTIFY)
BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS);
#ifdef __REACTOS__
if (((btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON)) &&
!(get_button_state(hWnd) & BST_CHECKED))
{
BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED);
}
#endif
break;
case WM_KILLFOCUS: