X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc4678159144f7c7bf0ba19b36d2604254f99d3a..6aa0103384e632ea2106bf61000dc78b976064c1:/src/msw/statbox.cpp?ds=inline diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index eede3a9705..03b1de9c65 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -151,4 +151,30 @@ wxSize wxStaticBox::DoGetBestSize() const return wxSize(wBox, hBox); } +// Required for implementing dialog editors, please do not remove +WXLRESULT wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) +{ + switch ( nMsg ) + { +#ifndef __WXWINCE__ + case 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; + } + break; +#endif + } + + return wxControl::MSWWindowProc(nMsg, wParam, lParam); +} + #endif // wxUSE_STATBOX +