X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..021efd65100322b3c152cc1017cfb961664d30a4:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 84c0e32811..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; @@ -2021,7 +2024,7 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if ( sizeFlags & wxSIZE_AUTO_WIDTH ) { - size = DoGetBestSize(); + size = GetBestSize(); width = size.x; } else @@ -2037,9 +2040,9 @@ void wxWindowMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if ( size.x == wxDefaultCoord ) { - size = DoGetBestSize(); + size = GetBestSize(); } - //else: already called DoGetBestSize() above + //else: already called GetBestSize() above height = size.y; } @@ -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 @@ -3117,6 +3120,7 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l case VK_SUBTRACT: case VK_MULTIPLY: case VK_DIVIDE: + case VK_DECIMAL: case VK_NUMPAD0: case VK_NUMPAD1: case VK_NUMPAD2: @@ -3445,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 @@ -3470,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; } } } @@ -3538,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); @@ -4743,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()); @@ -4770,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; } } @@ -4786,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;