?? mybutton.h
字號:
#if !defined(AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_)
#define AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MyButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CMyButton window
class CMyButton : public CButton
{
// Construction
public:
CMyButton();
public:
void SetSize(int nWidth, int nHeight);
void SetBitmaps(UINT nNormal, UINT nSelect, UINT nFocuse);
void DrawNormalState(CRect rc, CDC *pDC);
void DrawSelectedState(CRect rc, CDC *pDC);
void DrawFocusState(CRect rc, CDC *pDC);
void DrawFace(CRect& rc, COLORREF clrTopRight, COLORREF clrBottomLeft,
CDC* pDC);
void DrawFrame(CRect& rc, COLORREF clrTopRight, COLORREF clrBottomLeft,
CDC *pDC);
public:
BOOL m_bIsMouseMove;
CBitmap m_bmNormal;
CBitmap m_bmSelect;
CBitmap m_bmFocuse;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyButton)
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyButton();
// Generated message map functions
protected:
//{{AFX_MSG(CMyButton)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnClicked();
//}}AFX_MSG
afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYBUTTON_H__1B425AEB_661D_426C_998C_37C85EF445D5__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -