X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4438caf41af49f00f3c8137ac801871f59cce386..9b7e522ae97eb3d62bfb9ce6f527f1368c576e93:/src/msw/statbox.cpp diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index 686762f3bd..10f9310197 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -113,21 +113,10 @@ wxSize wxStaticBox::DoGetBestSize() return wxSize(wBox, hBox); } -void wxStaticBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) -{ - wxControl::DoSetSize(x, y, width, height, sizeFlags); - - // the static box should always be on the bottom of the Z-order, otherwise - // it may hide controls which are positioned inside it - if ( !::SetWindowPos(GetHwnd(), HWND_TOP, 0, 0, 0, 0, - SWP_NOMOVE | SWP_NOSIZE) ) - { - wxLogLastError(_T("SetWindowPos")); - } -} - WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, - WXUINT message, WXWPARAM wParam, WXLPARAM lParam) + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam) { #if wxUSE_CTL3D if ( m_useCtl3D ) @@ -172,9 +161,9 @@ void wxStaticBox::OnEraseBackground(wxEraseEvent& event) // Alternatively, just make sure that wxStaticBox is always at the back! There are probably // few other circumstances where it matters about child clipping. But what about painting onto // to panel, inside a groupbox? Doesn't appear, because the box wipes it out. - wxWindow *parent = GetParent(); - if ( parent && parent->GetHWND() && (::GetWindowLong((HWND) parent->GetHWND(), GWL_STYLE) & WS_CLIPCHILDREN) ) - { + wxWindow *parent = GetParent(); + if ( parent && parent->GetHWND() && (::GetWindowLong((HWND) parent->GetHWND(), GWL_STYLE) & WS_CLIPCHILDREN) ) + { // TODO: May in fact need to generate a paint event for inside this // control's rectangle, otherwise all controls are going to be clipped - // ugh. @@ -187,16 +176,16 @@ void wxStaticBox::OnEraseBackground(wxEraseEvent& event) ::FillRect ((HDC) event.GetDC()->GetHDC(), &rect, hBrush); ::DeleteObject(hBrush); ::SetMapMode((HDC) event.GetDC()->GetHDC(), mode); - } - else - { - event.Skip(); - } + } + else + { + event.Skip(); + } } long wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { - if ( 0 )//nMsg == WM_NCHITTEST) + if ( nMsg == WM_NCHITTEST) { int xPos = LOWORD(lParam); // horizontal position of cursor int yPos = HIWORD(lParam); // vertical position of cursor