📄 modeldlg.cpp
字号:
// ModelDlg.cpp : implementation file
//
#include "stdafx.h"
#include "VCStyle.h"
#include "ModelDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "data.h"
/////////////////////////////////////////////////////////////////////////////
// CModelDlg dialog
CModelDlg::CModelDlg(CWnd* pParent /*=NULL*/)
: CDialog(CModelDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CModelDlg)
m_type = 0;
m_addr = 0;
m_name = _T("");
//}}AFX_DATA_INIT
}
CModelDlg::CModelDlg(int type,UINT address)
{
m_type = type;
m_addr = address;
}
void CModelDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CModelDlg)
DDX_CBIndex(pDX, IDC_COMBO_TYPE, m_type);
DDX_Text(pDX, IDC_EDIT_ADDR, m_addr);
DDX_Text(pDX, IDC_EDIT_MDNAME, m_name);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CModelDlg, CDialog)
//{{AFX_MSG_MAP(CModelDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CModelDlg message handlers
UINT CModelDlg::GetSelType()
{
switch(m_type){
case 0://7703
return T_AD_7703;
case 1:
return T_AD_7703_2;
case 2:
return T_AD_7710;
case 3:
return T_QD;
default:
return T_NULL;
}
}
void CModelDlg::SetSel(UINT type)
{
switch(type){
case T_AD_7703:
m_type = 0;
break;
case T_AD_7703_2:
m_type = 1;
break;
case T_AD_7710:
m_type = 2;
break;
case T_QD:
m_type = 3;
break;
default:
m_type = -1;
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -