X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58331be29ab14a2067a9b20e49330bbccc1194ca..cc3977bf132d40cb66c6b488890ef67a396d4a0a:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 64e7ce2c52..cd5f076e00 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -90,6 +90,10 @@ #include "wx/caret.h" #endif // wxUSE_CARET +#if wxUSE_RADIOBOX + #include "wx/radiobox.h" +#endif // wxUSE_RADIOBOX + #if wxUSE_SPINCTRL #include "wx/spinctrl.h" #endif // wxUSE_SPINCTRL @@ -6541,13 +6545,13 @@ extern wxWindow *wxGetWindowFromHWND(WXHWND hWnd) win = wxFindWinFromHandle(hwnd); if ( !win ) { -#if wxUSE_RADIOBOX +#if wxUSE_RADIOBOX && !defined(__WXUNIVERSAL__) // native radiobuttons return DLGC_RADIOBUTTON here and for any // wxWindow class which overrides WM_GETDLGCODE processing to // do it as well, win would be already non NULL if ( ::SendMessage(hwnd, WM_GETDLGCODE, 0, 0) & DLGC_RADIOBUTTON ) { - win = (wxWindow *)wxGetWindowUserData(hwnd); + win = wxRadioBox::GetFromRadioButtonHWND(hwnd); } //else: it's a wxRadioButton, not a radiobutton from wxRadioBox #endif // wxUSE_RADIOBOX