X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/574c939ef1c1b835a8bc65c0fe724548fa04ec49..dbc65e2760f79e0296c7e8b49ec6791d62070d3e:/include/wx/msw/dc.h diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index 682bdb16b2..dde2cf4246 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -102,13 +102,15 @@ public: virtual void SelectOldObjects(WXHDC dc); wxWindow *GetWindow() const { return m_canvas; } - void SetWindow(wxWindow *win) { + void SetWindow(wxWindow *win) + { m_canvas = win; + #if wxUSE_PALETTE // if we have palettes use the correct one for this window InitializePalette(); -#endif - } +#endif // wxUSE_PALETTE + } WXHDC GetHDC() const { return m_hDC; } void SetHDC(WXHDC dc, bool bOwnsDC = FALSE) @@ -133,7 +135,7 @@ public: #endif protected: - virtual void DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE); virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const; @@ -195,10 +197,12 @@ protected: // (tell windows to translate pixel from other palettes to our custom one // and vice versa) // Realize tells it to also reset the system palette to this one. - void DoSelectPalette(bool realize = false); + void DoSelectPalette(bool realize = FALSE); + // Find out what palette our parent window has, then select it into the dc void InitializePalette(); -#endif +#endif // wxUSE_PALETTE + // common part of DoDrawText() and DoDrawRotatedText() void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);