?? ccebutton.h
字號(hào):
/////////////////////////////////////////////////////////////////////////////
// CCeButton window
class CCeButton : public CButton
{
// Construction
public:
CCeButton();
// Attributes
public:
CBitmap BkImage;//背景圖
CBitmap fImage; //前景圖1
CBitmap eImage; //前景圖2
CBrush brush; //畫(huà)刷
CBrush brush1;
CBrush brush2;
bool m_change;//是否狀態(tài)改變就更換圖片
bool m_gray;//是否灰化
bool m_state;//當(dāng)前狀態(tài),即是否使用第一張圖片
HMENU m_hMenu; // Handle to associated menu
HWND m_hParentWndMenu; // Handle to window for menu selection
BOOL m_bMenuDisplayed; // Is menu displayed ?
CString m_text;
COLORREF m_TextColor;
//矩形左上角坐標(biāo)
BOOL m_transparent;
// Operations
public:
DWORD SetMenu(UINT nMenu, HWND hParentWnd, BOOL bRepaint = TRUE);
virtual void SetTransparent(bool tran);
virtual void SetState(bool state);
virtual void SetText(CString text);
virtual void SetTextColor(COLORREF TextColor);
/*void SetTextColor(COLORREF TextColor = RGB(0,0,0));
BOOL FontStyle(CString sFont = "MS Sans Serif", int iHeight = 10, int iWidth = 6, BOOL bFont3D = FALSE, BOOL bConcave = FALSE);
inline void HideText(BOOL bHide = TRUE) { m_bHideText = bHide; }
void PaintText(HDC h_clientDC, CRect rect);*/
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(UniButton)
virtual void SetImage(int BkID,int fID,int eID,bool change=true);
virtual void SetGray(bool gray);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCeButton();
// Generated message map functions
protected:
/* CFont m_Font;
BOOL m_bFontCreated;
BOOL m_bFont3D;
BOOL m_bConcave;
BOOL m_bHideText;
COLORREF m_TextColor;*/
//{{AFX_MSG(UniButton)
afx_msg void OnPaint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnClicked();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -