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

📄 bitmapbuttondlg.cpp

📁 一个能轻松实现界面设计比特图按钮的小程序
💻 CPP
字号:
// BitmapButtonDlg.cpp : implementation file
//

#include "stdafx.h"
#include "BitmapButton.h"
#include "BitmapButtonDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBitmapButtonDlg dialog

CBitmapButtonDlg::CBitmapButtonDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CBitmapButtonDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CBitmapButtonDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CBitmapButtonDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CBitmapButtonDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
	DDX_Control(pDX, IDC_ZIP256, m_btnZip256);
	DDX_Control(pDX, IDC_ZIP256NF, m_btnZip2561);
}

BEGIN_MESSAGE_MAP(CBitmapButtonDlg, CDialog)
	//{{AFX_MSG_MAP(CBitmapButtonDlg)
	ON_BN_CLICKED(IDC_ZIP256, OnZip256)
	ON_BN_CLICKED(IDC_ZIP256NF, OnZip256nf)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBitmapButtonDlg message handlers

BOOL CBitmapButtonDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	CenterWindow(GetDesktopWindow());	// center to the hpc screen

	// TODO: Add extra initialization here
	
	m_btnZip256.SetIcon(IDI_ZIPSMALL256,IDI_ZIP256);
	m_btnZip2561.SetIcon(IDI_ZIPSMALL256,IDI_ZIP256);
	m_btnZip2561.SetFlat(FALSE);

	return TRUE;  // return TRUE  unless you set the focus to a control
}



void CBitmapButtonDlg::OnZip256() 
{
	AfxMessageBox(_T("您点击了平的Zip按钮^_^"));
}

void CBitmapButtonDlg::OnZip256nf() 
{
	AfxMessageBox(_T("您点击了突起的Zip按钮^_^"));
}

⌨️ 快捷键说明

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