added wxDC::GetHDC() for backwards compatibility with the existing wxMSW code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-10-08 16:09:09 +00:00
parent 2dcbf82958
commit f57258724a
2 changed files with 14 additions and 0 deletions

View File

@@ -1121,8 +1121,12 @@ public:
wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const ); wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const );
wxDEPRECATED( void GetDeviceOrigin(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 ); wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
#endif // WXWIN_COMPATIBILITY_2_8 #endif // WXWIN_COMPATIBILITY_2_8
#ifdef __WXMSW__
WXHDC GetHDC() const;
#endif // __WXMSW__
protected: protected:
// ctor takes ownership of the pointer // ctor takes ownership of the pointer

View 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 // wxMSWDCImpl
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------