X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fd86b2141ee25fd7505502e1a5d58e09da423e2..021efd65100322b3c152cc1017cfb961664d30a4:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 22f1b2f29f..bad095f9e9 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -724,6 +724,9 @@ wxWindowMSW::MSWShowWithEffect(bool show, wxShowEffect effect, unsigned timeout) { + if ( effect == wxSHOW_EFFECT_NONE ) + return Show(show); + if ( !wxWindowBase::Show(show) ) return false; @@ -2682,7 +2685,7 @@ LRESULT WXDLLEXPORT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM w // trace all messages: useful for the debugging but noticeably slows down // the code so don't do it by default #if wxDEBUG_LEVEL >= 2 - wxLogTrace(wxTraceMessages, + wxLogTrace("winmsg", wxT("Processing %s(hWnd=%p, wParam=%08lx, lParam=%08lx)"), wxGetMessageName(message), hWnd, (long)wParam, lParam); #endif // wxDEBUG_LEVEL >= 2 @@ -3446,9 +3449,10 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l // now alter the client size making room for drawing a // themed border RECT *rect; + NCCALCSIZE_PARAMS *csparam = NULL; if ( wParam ) { - NCCALCSIZE_PARAMS *csparam = (NCCALCSIZE_PARAMS *)lParam; + csparam = (NCCALCSIZE_PARAMS *)lParam; rect = &csparam->rgrc[0]; } else @@ -3471,8 +3475,14 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l &rcClient) == S_OK ) { InflateRect(&rcClient, -1, -1); - *rect = rcClient; - rc.result = WVR_REDRAW; + if (wParam) + csparam->rgrc[0] = rcClient; + else + *((RECT*)lParam) = rcClient; + + // WVR_REDRAW triggers a bug whereby child windows are moved up and left, + // so don't use. + // rc.result = WVR_REDRAW; } } } @@ -3539,7 +3549,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l if ( !processed ) { #if wxDEBUG_LEVEL >= 2 - wxLogTrace(wxTraceMessages, wxT("Forwarding %s to DefWindowProc."), + wxLogTrace("winmsg", wxT("Forwarding %s to DefWindowProc."), wxGetMessageName(message)); #endif // wxDEBUG_LEVEL >= 2 rc.result = MSWDefWindowProc(message, wParam, lParam); @@ -4744,15 +4754,10 @@ void wxWindowMSW::OnPaint(wxPaintEvent& event) bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc) { - // standard non top level controls (i.e. except the dialogs) always erase - // their background themselves in HandleCtlColor() or have some control- - // specific ways to set the colours (common controls) - if ( IsOfStandardClass() && !IsTopLevel() ) - return false; - switch ( GetBackgroundStyle() ) { case wxBG_STYLE_ERASE: + case wxBG_STYLE_COLOUR: // we need to generate an erase background event { wxDCTemp dc(hdc, GetClientSize()); @@ -4771,7 +4776,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc) if ( rc ) { - // background erase by the user-defined handler + // background erased by the user-defined handler return true; } } @@ -4787,6 +4792,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc) break; case wxBG_STYLE_PAINT: + case wxBG_STYLE_TRANSPARENT: // no need to do anything here at all, background will be entirely // redrawn in WM_PAINT handler break;