diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index ccc307e118..842e259d27 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -50,8 +50,8 @@ public: bool Ok() const { return m_refData != NULL; } - // create (if necessary) and return the HBRUSH for this brush - WXHBRUSH GetResourceHandle() const; + // return the HBRUSH for this brush + virtual WXHANDLE GetResourceHandle() const; protected: virtual wxObjectRefData *CreateRefData() const; diff --git a/include/wx/msw/gdiimage.h b/include/wx/msw/gdiimage.h index 0dca4c7931..3bf601dda4 100644 --- a/include/wx/msw/gdiimage.h +++ b/include/wx/msw/gdiimage.h @@ -180,7 +180,7 @@ public: // forward some of base class virtuals to wxGDIImageRefData bool FreeResource(bool force = FALSE); - virtual WXHANDLE GetResourceHandle(); + virtual WXHANDLE GetResourceHandle() const; protected: // create the data for the derived class here diff --git a/include/wx/msw/gdiobj.h b/include/wx/msw/gdiobj.h index e7285541d1..7ea71fbec2 100644 --- a/include/wx/msw/gdiobj.h +++ b/include/wx/msw/gdiobj.h @@ -49,7 +49,7 @@ public: bool IsNull() const { return (m_refData == 0); } // Returns handle. - virtual WXHANDLE GetResourceHandle() { return 0; } + virtual WXHANDLE GetResourceHandle() const { return 0; } virtual bool GetVisible() { return m_visible; } virtual void SetVisible(bool v) { m_visible = v; } diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 3c56bdaa70..a653d39db0 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -89,7 +89,7 @@ public: // Internal bool RealizeResource(); bool FreeResource(bool force = FALSE); - WXHANDLE GetResourceHandle() ; + WXHANDLE GetResourceHandle() const; bool IsFree() const; void Unshare(); }; diff --git a/src/msw/brush.cpp b/src/msw/brush.cpp index c201a55748..e47a77f3b1 100644 --- a/src/msw/brush.cpp +++ b/src/msw/brush.cpp @@ -293,11 +293,11 @@ wxBitmap *wxBrush::GetStipple() const return M_BRUSHDATA->GetStipple(); } -WXHBRUSH wxBrush::GetResourceHandle() const +WXHANDLE wxBrush::GetResourceHandle() const { wxCHECK_MSG( Ok(), FALSE, _T("invalid brush") ); - return (WXHBRUSH)M_BRUSHDATA->GetHBRUSH(); + return (WXHANDLE)M_BRUSHDATA->GetHBRUSH(); } // ---------------------------------------------------------------------------- diff --git a/src/msw/gdiimage.cpp b/src/msw/gdiimage.cpp index 28af1ffac1..1b5000fa5e 100644 --- a/src/msw/gdiimage.cpp +++ b/src/msw/gdiimage.cpp @@ -208,7 +208,7 @@ bool wxGDIImage::FreeResource(bool WXUNUSED(force)) return TRUE; } -WXHANDLE wxGDIImage::GetResourceHandle() +WXHANDLE wxGDIImage::GetResourceHandle() const { return GetHandle(); } diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index 599d747603..993af83b62 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -278,7 +278,7 @@ bool wxPen::RealizeResource() return FALSE; } -WXHANDLE wxPen::GetResourceHandle() +WXHANDLE wxPen::GetResourceHandle() const { if ( !M_PENDATA ) return 0;