CaptionTextAttributes.h
上传用户:zhoushen
上传日期:2022-06-15
资源大小:84k
文件大小:2k
- ////////////////////////////////////////////////////
- // Class providing text attributes for a window caption.
- // Text attributes are active and inactive fonts and
- // active and inactive colours.
- //
- // Used by custom caption class CCaption and its derived classes.
- //
- // Author: Dave Lorde (dlorde@cix.compulink.co.uk)
- //
- // Copyright January 2000
- //
- #ifndef CAPTIONTEXTATTRIBUTES_H
- #define CAPTIONTEXTATTRIBUTES_H
- #include "SystemCaptionFont.h"
- class AFX_EXT_CLASS CCaptionTextAttributes
- {
- public:
- CCaptionTextAttributes ();
- CCaptionTextAttributes (const CCaptionTextAttributes& cta);
- ~CCaptionTextAttributes ();
- COLORREF GetActiveColor () const;
- COLORREF GetInactiveColor () const;
- void SetCustomColors (COLORREF activeColor, COLORREF inactiveColor);
- void SetActiveColor (COLORREF activeColor);
- void SetInactiveColor (COLORREF inactiveColor);
- void UseSystemActiveColor ();
- void UseSystemInactiveColor ();
- void UseSystemColors ();
- CFont* GetActiveFont ();
- CFont* GetInactiveFont ();
- static CFont* GetSystemFont ();
- void UseSystemActiveFont ();
- void UseSystemInactiveFont ();
- void UseSystemFonts ();
-
- void SetActiveFont (CFont& font);
- void SetActiveFont (const LOGFONT& lf);
-
- void SetInactiveFont (CFont& font);
- void SetInactiveFont (const LOGFONT& lf);
- private:
- static CSystemCaptionFont m_SystemFont; // Shared default font
- CFont m_ActiveFont;
- CFont m_InactiveFont;
- COLORREF m_ActiveColor;
- COLORREF m_InactiveColor;
- };
- #endif