📄 bitmapbtn.h
字号:
#ifndef _BITMAPBTN_H
#define _BITMAPBTN_H
#if _MSC_VER > 1000
#pragma once
#endif
#include <afxwin.h>
#include <afxcmn.h>
class CBitmapBtn : public CButton
{
void InitToolTip();
CToolTipCtrl m_ToolTip;
// Construction
public:
BOOL m_Check, m_CheckedButton;
CBitmapBtn();
void SetTooltipText(CString* spText, BOOL bActivate = TRUE);
void ActivateTooltip(BOOL bActivate = TRUE);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBitmapBtn)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
void SetNormalState();
void SetOwnerDrawState();
void SetCheck(BOOL m_NewValue);
void SetBitmap(HBITMAP mNrml, HBITMAP mOvr, HBITMAP mDwn, HBITMAP mDsbl);
void SetBitmap(CBitmap* mNrml, CBitmap* mOvr, CBitmap* mDwn);
virtual ~CBitmapBtn();
// Generated message map functions
protected:
BOOL m_MouseOnButton;
CBitmap m_Normal, m_Over, m_Down, m_Disabled;
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
//{{AFX_MSG(CBitmapBtn)
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnCaptureChanged(CWnd *pWnd);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -