Replaced GraphicsHDC from src/msw/renderer.cpp with wxDC::GetTempHDC().
wxDC::GetTempHDC() method provides a convenient and safe way to retrieve HDC from a wxDC object, whether it is using GDI or GDI+. It is implemented using (MSW-specific) virtual functions in wxDC and so doesn't need ugly hacks like wxDynamicCast which were used in src/msw/renderer.cpp to achieve the same effect. Also, we now use GetTempHDC() consistently in all wxMSW rendering methods as the old GraphicsHDC was only used in some of them meaning that many methods didn't work at all with wxGCDC. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,6 +35,14 @@ public:
|
||||
wxGraphicsContext* GetGraphicsContext();
|
||||
void SetGraphicsContext( wxGraphicsContext* ctx );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// override wxDC virtual functions to provide access to HDC associated with
|
||||
// this Graphics object (implemented in src/msw/graphics.cpp)
|
||||
virtual WXHDC AcquireHDC();
|
||||
virtual void ReleaseHDC(WXHDC hdc);
|
||||
#endif // __WXMSW__
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGCDC)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGCDC);
|
||||
};
|
||||
|
Reference in New Issue
Block a user