]> git.saurik.com Git - wxWidgets.git/commitdiff
added Freeze/Thaw implementation for Windows
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Jul 2001 21:22:12 +0000 (21:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 29 Jul 2001 21:22:12 +0000 (21:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/window.h
src/msw/window.cpp

index 6bdc49db2a8e757ec7f91ac8fdfda909272281e7..25abce27c77867a22b2b78682abe4f4fe317d6ed 100644 (file)
@@ -90,6 +90,8 @@ public:
                           const wxRect *rect = (const wxRect *) NULL );
     virtual void Update();
     virtual void Clear();
+    virtual void Freeze();
+    virtual void Thaw();
 
     virtual bool SetCursor( const wxCursor &cursor );
     virtual bool SetFont( const wxFont &font );
index 49f54984e17313cb8513a4791096201ccb814ac3..7bbf3ce5cdb43007624a40733f1b9e131ab7a322 100644 (file)
@@ -1194,6 +1194,21 @@ void wxWindowMSW::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)
 {
     HWND hWnd = GetHwnd();