⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bmpbutton.cpp

📁 企业短信群发系统,业务范围广泛的公司中
💻 CPP
字号:
// BmpButton.cpp : implementation file
//

#include "stdafx.h"
#include "NoteManage.h"
#include "BmpButton.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBmpButton

CBmpButton::CBmpButton()
{
}

CBmpButton::~CBmpButton()
{
}


BEGIN_MESSAGE_MAP(CBmpButton, CButton)
	//{{AFX_MSG_MAP(CBmpButton)
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBmpButton message handlers

void CBmpButton::SetHBitmap(HBITMAP m_hbmp1, HBITMAP m_hbmp2)
{
	m_Hbitmap1 = m_hbmp1;
	m_Hbitmap2 = m_hbmp2;
}

void CBmpButton::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CButton::OnMouseMove(nFlags, point);
	CRect rect;
	GetClientRect(&rect);
	if(rect.PtInRect(point))
	{
		SetCapture();
		SetBitmap(m_Hbitmap1);
	}
	else
	{
		ReleaseCapture();
		SetBitmap(m_Hbitmap2);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -