📄 proppageframe.h
字号:
#if !defined(AFX_PROPPAGEFRAME_H__B968548B_F0B4_4C35_85DD_C44242A9D368__INCLUDED_)
#define AFX_PROPPAGEFRAME_H__B968548B_F0B4_4C35_85DD_C44242A9D368__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CPropPageFrame:public CWnd
{
// Construction/Destruction
public:
CPropPageFrame();
virtual ~CPropPageFrame();
// Operations
public:
//以渐变色填充标题栏
void FillGradientRectH(CDC *pDc, const RECT &rect, COLORREF clrLeft, COLORREF clrRight);
//必须使用指定的属性创建窗口
BOOL Create(DWORD dwWindowStyle, const RECT &rect, CWnd *pwndParent, UINT nID);
//返回窗口对象的指针,该对象表示了框架
CWnd* GetWnd();
//启用或禁用页标题。
void ShowCaption(BOOL bEnable);
BOOL GetShowCaption() const;
//设置标题的像素高度
void SetCaptionHeight(int nCaptionHeight);
//返回标题的像素高度
int GetCaptionHeight() const;
//为标题文本设置图标
void SetCaption(LPCTSTR lpszCaption, HICON hIcon = NULL);
//返回标题的文本,
CString GetCaption(HICON *pIcon = NULL) const;
//设置显示的文本
void SetMsgText(LPCTSTR lpszMsg);
//返回当前显示的文
CString GetMsgText() const;
//指定绘制文本的格式
void SetMsgFormat(DWORD dwFormat);
//获取绘制的文本的格式
DWORD GetMsgFormat() const;
// Overridable implementation helpers
protected:
//绘制整个框架包括标题和文本
void Draw(CDC *pDc);
CRect CalcMsgArea();
//使用指定的格式绘制文本
void DrawMsg(CDC *pDc, CRect rect, LPCTSTR lpszMsg, DWORD dwFormat);
//计算标题区域
CRect CalcCaptionArea();
//绘制标题
void DrawCaption(CDC *pDc, CRect rect, LPCTSTR lpszCaption, HICON hIcon);
// Implementation helpers
protected:
//安全地更新窗口区域
void SafeUpdateWindow(LPCRECT lpRect = NULL);
protected:
//{{AFX_VIRTUAL(CPropPageFrame)
//}}AFX_VIRTUAL
// message handlers
protected:
//{{AFX_MSG(CPropPageFrame)
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Properties
private:
//绘制标题的标志
BOOL m_bShowCaption;
//标题的高度
int m_nCaptionHeight;
//标题内容
CString m_strCaption;
//标题的图标,可以为NULL
HICON m_hCaptionIcon;
// 显示的消息
CString m_strMsg;
//绘制消息文本m_strMsg时所使用的格式
DWORD m_dwMsgFormat;
CImageList m_Images;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ ft unmittelbar vor der vorhergehenden Zeile zuszliche Deklarationen ein.
#endif // AFX_PROPPAGEFRAME_H__B968548B_F0B4_4C35_85DD_C44242A9D368__INCLUDED_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -