diff --git a/include/wx/msw/toplevel.h b/include/wx/msw/toplevel.h index fb242e68f7..52905cc32a 100644 --- a/include/wx/msw/toplevel.h +++ b/include/wx/msw/toplevel.h @@ -141,6 +141,8 @@ protected: virtual void DoFreeze(); virtual void DoThaw(); + virtual void DoEnable(bool enable); + // helper of SetIcons(): calls gets the icon with the size specified by the // given system metrics (SM_C{X|Y}[SM]ICON) from the bundle and sets it // using WM_SETICON with the specified wParam (ICOM_SMALL or ICON_BIG); diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index ba45599a81..87508df811 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -1279,6 +1279,17 @@ bool wxTopLevelWindowMSW::CanSetTransparent() return (os_type == wxOS_WINDOWS_NT && ver_major >= 5); } +void wxTopLevelWindowMSW::DoEnable(bool enable) +{ + wxTopLevelWindowBase::DoEnable(enable); + + // Enabling or disabling a window may change its appearance. Unfortunately, + // in at least some situation, toplevel windows don't repaint themselves, + // so we have to issue explicit refresh to avoid rendering artifacts. + // + // TODO: find out just what exactly is wrong here + Refresh(); +} void wxTopLevelWindowMSW::DoFreeze() {