CaptionBackground.h
上传用户:kssdz899
上传日期:2007-01-08
资源大小:79k
文件大小:1k
- #ifndef CAPTION_BACKGROUND_H
- #define CAPTION_BACKGROUND_H
- /////////////////////////////////
- // Class for painting a windows caption background.
- // Used by caption painting class CCaption as the
- // default background painter if one is not explicitly
- // supplied.
- //
- // Derive new classes and override its methods to paint
- // unusual caption backgrounds.
- //
- // Author: Dave Lorde (dlorde@cix.compulink.co.uk)
- //
- // Copyright January 2000
- //
- class AFX_EXT_CLASS CCaptionBackground
- {
- public:
- CCaptionBackground();
- CCaptionBackground(const CCaptionBackground& cb);
- virtual ~CCaptionBackground() {}
- virtual void Paint(CDC* pDC, CSize paintArea, BOOL active);
- void SetCustomColors(COLORREF activeColor, COLORREF inactiveColor);
- void SetCustomColors(const CCaptionBackground& cb);
- void SetActiveColor(COLORREF activeColor);
- void SetInactiveColor(COLORREF inactiveColor);
- void UseSystemActiveColor();
- void UseSystemInactiveColor();
- void UseSystemColors();
- virtual COLORREF GetActiveColor() const;
- virtual COLORREF GetInactiveColor() const;
- static void PaintRect(CDC* pDC, int x, int y, int w, int h, COLORREF color);
- protected:
- private:
- COLORREF m_ActiveColor;
- COLORREF m_InactiveColor;
- };
- #endif