picbutton.h
来自「这个程序实现了将样本划分为k个聚类」· C头文件 代码 · 共 44 行
H
44 行
#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 + =
减小字号Ctrl + -
显示快捷键?