added Freeze/Thaw implementation for Windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-29 21:22:12 +00:00
parent 4f3449b432
commit a0e449ff41
2 changed files with 17 additions and 0 deletions

View File

@@ -90,6 +90,8 @@ public:
const wxRect *rect = (const wxRect *) NULL ); const wxRect *rect = (const wxRect *) NULL );
virtual void Update(); virtual void Update();
virtual void Clear(); virtual void Clear();
virtual void Freeze();
virtual void Thaw();
virtual bool SetCursor( const wxCursor &cursor ); virtual bool SetCursor( const wxCursor &cursor );
virtual bool SetFont( const wxFont &font ); virtual bool SetFont( const wxFont &font );

View File

@@ -1194,6 +1194,21 @@ void wxWindowMSW::Clear()
dc.Clear(); dc.Clear();
} }
static inline void SendSetRedraw(HWND hwnd, bool on)
{
::SendMessage(hwnd, WM_SETREDRAW, (WPARAM)on, 0);
}
void wxWindowMSW::Freeze()
{
SendSetRedraw(FALSE);
}
void wxWindowMSW::Thaw()
{
SendSetRedraw(TRUE);
}
void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect) void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
{ {
HWND hWnd = GetHwnd(); HWND hWnd = GetHwnd();