X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31582e4e11d504a28461d62b05411202d3a906d0..3ef092d63b3757744beb71a61a3b818e207632b3:/src/msw/radiobox.cpp diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index b5cdc6eeda..35860e2313 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "radiobox.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -40,11 +36,6 @@ #include "wx/msw/subwin.h" -// This is switched off because in some situations, the radiobox -// buttons simply don't appear when deferred sizing is on. -// Instead, refreshing on WM_MOVE seems to at least cure the droppings. -#define USE_DEFERRED_SIZING 0 - #if wxUSE_TOOLTIPS #if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) #include @@ -557,17 +548,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) height = heightOld; } - // if our parent had prepared a defer window handle for us, use it (unless - // we are a top level window) - -#if USE_DEFERRED_SIZING - wxWindowMSW *parent = GetParent(); - HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL; -#else - HDWP hdwp = 0; -#endif - - wxMoveWindowDeferred(hdwp, this, GetHwnd(), xx, yy, width, height); + DoMoveWindow(xx, yy, width, height); // Now position all the buttons: the current button will be put at // wxPoint(x_offset, y_offset) and the new row/column will start at @@ -664,14 +645,6 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) x_offset += widthBtn + cx1; } } - -#if USE_DEFERRED_SIZING - if (parent) - { - // hdwp must be updated as it may have been changed - parent->m_hDWP = (WXHANDLE)hdwp; - } -#endif } // ---------------------------------------------------------------------------- @@ -700,28 +673,11 @@ WXHRGN wxRadioBox::MSWGetRegionWithoutChildren() WXLRESULT wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { - if ( nMsg == WM_PRINTCLIENT ) - { - // we have to process WM_PRINTCLIENT ourselves as otherwise the radio - // buttons background would never be drawn unless we have a parent with - // non default background - - // so check first if we have one - if ( !HandlePrintClient((WXHDC)wParam) ) - { - // no, we don't, erase the background ourselves (don't use our own - // colour as with static box, see comments there) - wxBrush brush(GetParent()->GetBackgroundColour()); - wxFillRect(GetHwnd(), (HDC)wParam, GetHbrushOf(brush)); - } - - return 0; - } // FIXME: Without this, the radiobox corrupts other controls as it moves // in a dynamic layout. Refreshing causes flicker, but it's better than // leaving droppings. Note that for some reason, wxStaticBox doesn't need // this (perhaps because it has no real children?) - else if (nMsg == WM_MOVE) + if ( nMsg == WM_MOVE ) { WXLRESULT res = wxControl::MSWWindowProc(nMsg, wParam, lParam); wxRect rect = GetRect();