mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[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:
parent
a842a92260
commit
d6c70f0864
2 changed files with 14 additions and 0 deletions
|
@ -1043,6 +1043,13 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
|
||||||
paint_button( infoPtr, btn_type, ODA_FOCUS );
|
paint_button( infoPtr, btn_type, ODA_FOCUS );
|
||||||
if (style & BS_NOTIFY)
|
if (style & BS_NOTIFY)
|
||||||
BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS);
|
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;
|
break;
|
||||||
|
|
||||||
case WM_KILLFOCUS:
|
case WM_KILLFOCUS:
|
||||||
|
|
|
@ -532,6 +532,13 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
||||||
paint_button( hWnd, btn_type, ODA_FOCUS );
|
paint_button( hWnd, btn_type, ODA_FOCUS );
|
||||||
if (style & BS_NOTIFY)
|
if (style & BS_NOTIFY)
|
||||||
BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS);
|
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;
|
break;
|
||||||
|
|
||||||
case WM_KILLFOCUS:
|
case WM_KILLFOCUS:
|
||||||
|
|
Loading…
Reference in a new issue