]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxDC::GetHDC() for backwards compatibility with the existing wxMSW code
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Oct 2008 16:09:09 +0000 (16:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Oct 2008 16:09:09 +0000 (16:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index fefa92f50e64e69dc9ecae3ae2286832f1c07c2e..ce9356e65393794fce3758a18cd3c3641468f3df 100644 (file)
@@ -1121,8 +1121,12 @@ public:
     wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const );
     wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const );
     wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
+
 #endif  // WXWIN_COMPATIBILITY_2_8
 
+#ifdef __WXMSW__
+    WXHDC GetHDC() const;
+#endif // __WXMSW__
 
 protected:
     // ctor takes ownership of the pointer
index c912e076aaafb3a2a327587ebc272c6920f379e8..d878f66645385b778425e3db9fc0a8992cdb4b23 100644 (file)
@@ -399,6 +399,16 @@ wxBrushAttrsSetter::wxBrushAttrsSetter(wxMSWDCImpl& dc)
     }
 }
 
+// ----------------------------------------------------------------------------
+// wxDC MSW-specific methods
+// ----------------------------------------------------------------------------
+
+WXHDC wxDC::GetHDC() const
+{
+    wxMSWDCImpl * const impl = wxDynamicCast(GetImpl(), wxMSWDCImpl);
+    return impl ? impl->GetHDC() : 0;
+}
+
 // ---------------------------------------------------------------------------
 // wxMSWDCImpl
 // ---------------------------------------------------------------------------