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

📄 selectdialog.cpp

📁 上位机与下位机的USB通讯
💻 CPP
字号:
// SelectDialog.cpp : implementation file
//

#include "stdafx.h"
#include "TestPanel.h"
#include "SelectDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSelectDialog dialog


CSelectDialog::CSelectDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CSelectDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSelectDialog)
	m_deviceIndex = -1;
	//}}AFX_DATA_INIT
}


void CSelectDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSelectDialog)
	DDX_Control(pDX, IDC_STATIC1, m_Caption);
	DDX_Control(pDX, IDC_DEVICELIST, m_ctlDevicelist);
	DDX_CBIndex(pDX, IDC_DEVICELIST, m_deviceIndex);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSelectDialog, CDialog)
	//{{AFX_MSG_MAP(CSelectDialog)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSelectDialog message handlers

void CSelectDialog::Initialize(DeviceList* devList) 
{
	//CDialog::OnInitDialog();
	m_deviceList = *devList;
}

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

	for (int i = 0; i < m_deviceList.size(); i++)
	{
		m_ctlDevicelist.AddString(m_deviceList[i]);
	}
	m_ctlDevicelist.SetCurSel(i - 1);
    CFont * f; 
     f = new CFont; 
     f->CreateFont(30, // nHeight 
     16, // nWidth 
     0, // nEscapement 
     0, // nOrientation 
     FW_BOLD, // nWeight 
     TRUE, // bItalic 
     FALSE, // bUnderline 
     0, // cStrikeOut 
     ANSI_CHARSET, // nCharSet 
     OUT_DEFAULT_PRECIS, // nOutPrecision 
     CLIP_DEFAULT_PRECIS, // nClipPrecision 
     DEFAULT_QUALITY, // nQuality 
     DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily 
     _T("Arial")); // lpszFac 
     m_Caption.SetFont(f); 
     m_Caption.SetWindowText("欢迎使用图像式刀调仪系统!"); 
     GetDlgItem(IDC_STATIC1)->SetFont(f); 

	return TRUE;
    
    
}

⌨️ 快捷键说明

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