X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..656fc51cda91ea40154358a6adcd85ded506812a:/src/msw/radiobox.cpp diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 529c46dbd3..54cd5c5a97 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -1025,6 +1025,49 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, } } } + break; + +#ifdef __WIN32__ + case WM_HELP: + { + wxRadioBox *radiobox = (wxRadioBox *) + ::GetWindowLong(hwnd, GWL_USERDATA); + + wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") ); + + bool processed = TRUE; + + HELPINFO* info = (HELPINFO*) lParam; + // Don't yet process menu help events, just windows + if (info->iContextType == HELPINFO_WINDOW) + { + wxWindow* subjectOfHelp = radiobox; + bool eventProcessed = FALSE; + while (subjectOfHelp && !eventProcessed) + { + wxHelpEvent helpEvent(wxEVT_HELP, subjectOfHelp->GetId(), wxPoint(info->MousePos.x, info->MousePos.y) ) ; // info->iCtrlId); + helpEvent.SetEventObject(radiobox); + eventProcessed = radiobox->GetEventHandler()->ProcessEvent(helpEvent); + + // Go up the window hierarchy until the event is handled (or not) + subjectOfHelp = subjectOfHelp->GetParent(); + } + processed = eventProcessed; + } + else if (info->iContextType == HELPINFO_MENUITEM) + { + wxHelpEvent helpEvent(wxEVT_HELP, info->iCtrlId) ; + helpEvent.SetEventObject(radiobox); + processed = radiobox->GetEventHandler()->ProcessEvent(helpEvent); + } + else processed = FALSE; + + if (processed) + return 0; + + break; + } +#endif } return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn, hwnd, message, wParam, lParam);