git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47124
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
const unsigned int count = GetCount();
for ( unsigned int i = 0; i < count; i++ )
{
const unsigned int count = GetCount();
for ( unsigned int i = 0; i < count; i++ )
{
- if ( id == wxGetWindowId((*m_radioButtons)[i]) )
+ const HWND hwndBtn = (*m_radioButtons)[i];
+ if ( id == wxGetWindowId(hwndBtn) )
+ // we can get BN_CLICKED for a button which just became focused
+ // but it may not be checked, in which case we shouldn't
+ // generate a radiobox selection changed event for it
+ if ( ::SendMessage(hwndBtn, BM_GETCHECK, 0, 0) == BST_CHECKED )
+ selectedButton = i;