mybitmapbutton.cpp

来自「Visual C++串口通信工程开发 随书源带码」· C++ 代码 · 共 57 行

CPP
57
字号
// MyBitmapButton.cpp : implementation file
//

#include "stdafx.h"
#include "yuntai.h"
#include "MyBitmapButton.h"
#include "YuntaiDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyBitmapButton

CMyBitmapButton::CMyBitmapButton()
{
}

CMyBitmapButton::~CMyBitmapButton()
{
}


BEGIN_MESSAGE_MAP(CMyBitmapButton, CBitmapButton)
	//{{AFX_MSG_MAP(CMyBitmapButton)
	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyBitmapButton message handlers

//DEL BOOL CMyBitmapButton::OnCommand(WPARAM wParam, LPARAM lParam) 
//DEL {
//DEL 	// TODO: Add your specialized code here and/or call the base class
//DEL 	
//DEL 	return CBitmapButton::OnCommand(wParam, lParam);
//DEL }

void CMyBitmapButton::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	((CYuntaiDlg*)GetParent())->OnActDown(this->GetDlgCtrlID());
	CBitmapButton::OnLButtonDown(nFlags, point);
}

	void CMyBitmapButton::OnLButtonUp(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	((CYuntaiDlg*)GetParent())->OnActUp(this->GetDlgCtrlID());	
	CBitmapButton::OnLButtonUp(nFlags, point);
}

⌨️ 快捷键说明

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