📄 focustomstatic.h
字号:
// Copyright UCanCode Software Technology Inc, All Rights Reserved
// You can contact us.
// Support@UCanCode.net
// http://www.ucancode.net
/********************************************************************/
#if !defined(AFX_FOCUSTOMSTATIC_H__02063CA4_04B5_11D6_A4F2_525400EA266C__INCLUDED_)
#define AFX_FOCUSTOMSTATIC_H__02063CA4_04B5_11D6_A4F2_525400EA266C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FOCustomStatic.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CFOCustomStatic window
class CFOCustomStatic : public CStatic
{
DECLARE_DYNAMIC(CFOCustomStatic)
// @access Construction
public:
// Constructs a <c CFOCustomStatic> control object.
CFOCustomStatic();
// Operations
public:
// Determines the smallest button size necessary
// to fit the button face.
virtual void GetSizeToContent(CSize& size);
// Determines the text extents for the specified string.
virtual CSize GetTextExtent(CDC& dc, CString strCaption);
// Sets the distance between the button edge and
// the focus rectangle.
int SetFocusBorder(int cxFocusBorder);
// Resizes the button so it fits the
// smallest bounding rectangle for the button face.
virtual void SizeToContent();
// Redraws the button.
virtual void RecalcLayout();
// @access Overridables
public:
// Called to calculate the button face rectangle.
virtual void GetFaceRect(CDC& dc, CRect rCStatic, CRect& rc,BOOL bSizeToContent = FALSE);
// Called to calculate the button focus rectangle.
virtual void GetFocusRect(CDC& dc, CRect rCStatic, CRect& rc);
// Draws the specified button caption.
virtual void DrawCaption(CDC& dc, CPoint pt,CString strCaption, UINT uState);
// Called before drawing begins so you can adjust attributes
// of the device context.
virtual void OnPrepareDC(CDC& dc);
// Override to draw a custom button face.
virtual void OnDrawFace(CDC& dc, const CRect& rc, UINT uState);
// Override to draw a custom button focus state.
virtual void OnDrawFocus(CDC& dc, const CRect& rc);
// Override to draw a custom button frame.
virtual void OnDrawFrame(CDC& dc, CRect& rc, UINT uState);
// Called after the button is drawn to restore the
// device context.
virtual void OnClearDC(CDC& dc);
// Overrides
public:
virtual ~CFOCustomStatic();
// Generated message map functions
protected:
//{{AFX_MSG(CFOCustomStatic)
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
// Face rectangle.
CRect m_rcFace;
// Font pointer.
CFont* m_pOldFont;
// Border.
int m_nBorder;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FOCUSTOMSTATIC_H__02063CA4_04B5_11D6_A4F2_525400EA266C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -