::ShowWindow(hWnd, show ? SW_SHOW : SW_HIDE);
}
+ if ( IsFrozen() )
+ {
+ // DoFreeze/DoThaw don't do anything if the window is not shown, so
+ // we have to call them from here now
+ if ( show )
+ DoFreeze();
+ else
+ DoThaw();
+ }
+
return true;
}
unsigned timeout,
wxDirection dir)
{
+ if ( !wxWindowBase::Show(show) )
+ return false;
+
typedef BOOL (WINAPI *AnimateWindow_t)(HWND, DWORD, DWORD);
static AnimateWindow_t s_pfnAnimateWindow = NULL;
void wxWindowMSW::DoFreeze()
{
- if ( IsShown() )
- SendSetRedraw(GetHwnd(), false);
+ if ( !IsShown() )
+ return; // no point in freezing hidden window
+
+ SendSetRedraw(GetHwnd(), false);
}
void wxWindowMSW::DoThaw()
{
- if ( IsShown() )
- {
- SendSetRedraw(GetHwnd(), true);
+ if ( !IsShown() )
+ return; // hidden windows aren't frozen by DoFreeze
- // we need to refresh everything or otherwise the invalidated area
- // is not going to be repainted
- Refresh();
- }
+ SendSetRedraw(GetHwnd(), true);
+
+ // we need to refresh everything or otherwise the invalidated area
+ // is not going to be repainted
+ Refresh();
}
void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
rect = (RECT *)lParam;
}
- wxUxThemeHandle hTheme((wxWindow *)this, L"EDIT");
+ wxUxThemeHandle hTheme((const wxWindow *)this, L"EDIT");
RECT rcClient = { 0, 0, 0, 0 };
wxClientDC dc((wxWindow *)this);
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
rc.result = MSWDefWindowProc(message, wParam, lParam);
processed = true;
- wxUxThemeHandle hTheme((wxWindow *)this, L"EDIT");
+ wxUxThemeHandle hTheme((const wxWindow *)this, L"EDIT");
wxWindowDC dc((wxWindow *)this);
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc.GetImpl();
break;
case PBT_APMRESUMESUSPEND:
-#ifdef PBT_APMRESUMEAUTOMATIC
- case PBT_APMRESUMEAUTOMATIC:
-#endif
evtType = wxEVT_POWER_RESUME;
break;
case PBT_APMPOWERSTATUSCHANGE:
case PBT_APMOEMEVENT:
case PBT_APMRESUMECRITICAL:
+#ifdef PBT_APMRESUMEAUTOMATIC
+ case PBT_APMRESUMEAUTOMATIC:
+#endif
evtType = wxEVT_NULL;
break;
}