Inexplicable removal of wxRadioBox::MSWWindowProc reversed, so wxRadioBox
works in Dialog Editor again. Compile error in Dialog Editor fixed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -687,6 +687,26 @@ void wxRadioBox::SendNotificationEvent()
|
||||
ProcessCommand(event);
|
||||
}
|
||||
|
||||
long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
// This is required for the radiobox to be sensitive to mouse input,
|
||||
// e.g. for Dialog Editor.
|
||||
if (nMsg == WM_NCHITTEST)
|
||||
{
|
||||
int xPos = LOWORD(lParam); // horizontal position of cursor
|
||||
int yPos = HIWORD(lParam); // vertical position of cursor
|
||||
|
||||
ScreenToClient(&xPos, &yPos);
|
||||
|
||||
// Make sure you can drag by the top of the groupbox, but let
|
||||
// other (enclosed) controls get mouse events also
|
||||
if (yPos < 10)
|
||||
return (long)HTCLIENT;
|
||||
}
|
||||
|
||||
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// window proc for radio buttons
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user