]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcclient.cpp
don't provide unnecessary (as default) arguments to wxPen ctor, this incidentally...
[wxWidgets.git] / src / msw / dcclient.cpp
index 96737f424e2dfa50ea5da4adc084b22dc2597008..3eff38d0d4bbd01b181d52090bf2c6fb58537757 100644 (file)
@@ -90,7 +90,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner ) :
 {
 }
 
-wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) : 
+wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) :
    wxMSWDCImpl( owner )
 {
     wxCHECK_RET( window, _T("invalid window in wxWindowDCImpl") );
@@ -169,7 +169,8 @@ void wxClientDCImpl::InitDC()
     }
 
     // clip the DC to avoid overwriting the non client area
-    SetClippingRegion(wxPoint(0,0), m_window->GetClientSize());
+    wxSize size = m_window->GetClientSize();
+    DoSetClippingRegion(0, 0, size.x, size.y);
 #endif // __WXUNIVERSAL__ || __WXWINCE__
 }
 
@@ -329,27 +330,25 @@ class wxPaintDCExImpl: public wxPaintDCImpl
 public:
     wxPaintDCExImpl( wxDC *owner, wxWindow *window, WXHDC dc );
     ~wxPaintDCExImpl();
-    
+
     int m_saveState;
 };
 
 
 IMPLEMENT_ABSTRACT_CLASS(wxPaintDCEx,wxPaintDC)
 
-wxPaintDCEx::wxPaintDCEx( wxWindow *window, WXHDC dc )
+wxPaintDCEx::wxPaintDCEx(wxWindow *window, WXHDC dc)
+           : wxPaintDC(new wxPaintDCExImpl(this, window, dc))
 {
-    m_pimpl = new wxPaintDCExImpl( this, window, dc );
 }
 
-
-
-wxPaintDCExImpl::wxPaintDCExImpl( wxDC *owner, wxWindow *window, WXHDC dc ) :
-    wxPaintDCImpl( owner )
+wxPaintDCExImpl::wxPaintDCExImpl(wxDC *owner, wxWindow *window, WXHDC dc)
+               : wxPaintDCImpl( owner )
 {
         wxCHECK_RET( dc, wxT("wxPaintDCEx requires an existing device context") );
 
         m_saveState = 0;
-        
+
         m_window = window;
 
         wxPaintDCInfo *info = FindInCache();