📄 picbutton.h
字号:
#pragma once
#include "stdafx.h"
// PicButton 图片按钮
class PicButton : public CButton
{
DECLARE_DYNAMIC(PicButton)
protected:
// 按钮的状态
BOOL m_bOver; // 鼠标位于按钮之上时该值为true,反之为flase
BOOL m_bTracking; // 在鼠标按下没有释放时该值为true
BOOL m_bSelected; // 按钮被按下是该值为true
// 按钮图素
CBitmap m_imgNormal;
CBitmap m_imgOver;
CBitmap m_imgSelected;
public:
PicButton();
virtual ~PicButton();
protected:
DECLARE_MESSAGE_MAP()
public:
// 载入图片
void LoadImages(UINT nIDnormal, UINT nIDover, UINT nIDseleted);
virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnMouseHover(WPARAM wParam, LPARAM lParam);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
protected:
virtual void PreSubclassWindow();
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
public:
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -