picdialog.cpp

来自「VC6开发的用于进行色谱分析的示例」· C++ 代码 · 共 61 行

CPP
61
字号
// picDialog.cpp : implementation file
//

#include "stdafx.h"
#include "MyWork.h"
#include "picDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CpicDialog dialog


CpicDialog::CpicDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CpicDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CpicDialog)
	//}}AFX_DATA_INIT
}


void CpicDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CpicDialog)
	DDX_Control(pDX, IDC_PIC, m_piture);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CpicDialog, CDialog)
	//{{AFX_MSG_MAP(CpicDialog)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CpicDialog message handlers

BOOL CpicDialog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CString bmp;
	bmp=m_Bmpath;
	HBITMAP hBitmap=(HBITMAP)LoadImage(NULL,_T(bmp),IMAGE_BITMAP,
		0,0,LR_CREATEDIBSECTION|LR_DEFAULTSIZE|LR_LOADFROMFILE);
	m_piture.SetBitmap(hBitmap);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

CpicDialog::Getpath(CString path)
{
	m_Bmpath=path;
}

⌨️ 快捷键说明

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