countdlg.cpp

来自「UHF RFID Reader Program」· C++ 代码 · 共 71 行

CPP
71
字号
// ../CountDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RFRM.h"
#include "CountDlg.h"

#ifdef LARGE_COUNT
// CCountDlg dialog

IMPLEMENT_DYNAMIC(CCountDlg, CDialog)

CCountDlg::CCountDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CCountDlg::IDD, pParent)
{

}

CCountDlg::~CCountDlg()
{
}

void CCountDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CCountDlg, CDialog)
END_MESSAGE_MAP()


// CCountDlg message handlers

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

	CRect rect;
	CClientDC dc(this);
	CEdit* pCtlEdit = (CEdit*) GetDlgItem(IDC_EDIT_COUNT_LARGE); // edit control狼 

	pCtlEdit->GetWindowRect(&rect);

	int height = dc.GetDeviceCaps(LOGPIXELSY) * 300 / 72; // 9器牢飘

	_traceLogfont.CreateFont(height, 0, 0, 0, FW_BOLD, 0, 0, 0, 
		DEFAULT_CHARSET, OUT_CHARACTER_PRECIS, 
		CLIP_CHARACTER_PRECIS, 
		DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial Black"));

	dc.SelectObject(&_traceLogfont);//<==================夸霸 歹甸绢啊胯 
	pCtlEdit->SetFont(&_traceLogfont, FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}

void CCountDlg::PostNcDestroy()
{
	CDialog::PostNcDestroy();
	delete this;
}

void CCountDlg::SetCount(LPCTSTR count)
{
	CEdit* pCtlEdit = (CEdit*) GetDlgItem(IDC_EDIT_COUNT_LARGE); // edit control狼 
	pCtlEdit->SetWindowText(count);
}

#endif

⌨️ 快捷键说明

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