]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dc.cpp
wxFileCtrl::Update was hiding wxWindow::Update
[wxWidgets.git] / src / os2 / dc.cpp
index c0f1fefcd4c7e747bd837345e85cb19c04b8c93b..2bee9f08e637ce9cd3fe9458967caec7a03331d7 100644 (file)
@@ -23,6 +23,7 @@
     #include "wx/log.h"
     #include "wx/icon.h"
     #include "wx/msgdlg.h"
+    #include "wx/module.h"
 #endif
 
 #include "wx/dcprint.h"
@@ -204,7 +205,7 @@ wxDCCacheEntry* wxDC::FindBitmapInCache(
 , int                               nHeight
 )
 {
-    int                             nDepth = 24 // we'll fix this later ::GetDeviceCaps((HDC) dc, PLANES) * ::GetDeviceCaps((HDC) dc, BITSPIXEL);
+    int                             nDepth = 24; // we'll fix this later ::GetDeviceCaps((HDC) dc, PLANES) * ::GetDeviceCaps((HDC) dc, BITSPIXEL);
     wxNode*                         pNode = m_svBitmapCache.First();
     BITMAPINFOHEADER2               vBmpHdr;
 
@@ -541,6 +542,18 @@ int wxDC::GetDepth() const
 
 void wxDC::Clear()
 {
+    //
+    // If this is a canvas DC then just fill with the background color
+    // Otherwise purge the whole thing
+    //
+    if (m_pCanvas)
+    {
+        RECTL                       vRect;
+
+        ::GpiQueryClipBox(m_hPS, &vRect);
+        ::WinFillRect(m_hPS, &vRect, ::GpiQueryBackColor(m_hPS));
+    }
+    else
     ::GpiErase(m_hPS);
 } // end of wxDC::Clear