📄 setdialog.cpp
字号:
// SetDialog.cpp : implementation file
//
#include "stdafx.h"
#include "MyStudent.h"
#include "SetDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetDialog dialog
CSetDialog::CSetDialog(CWnd* pParent /*=NULL*/)
: CDialog(CSetDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetDialog)
m_midterm_coef = 0.1f;
m_endterm_coef = 0.8f;
m_normal_coef = 1.0f;
m_dsn_name = _T("学生成绩表");
m_table_name = _T("学生成绩表");
//}}AFX_DATA_INIT
}
void CSetDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetDialog)
DDX_Text(pDX, IDC_EDIT_SET_MIDTERM, m_midterm_coef);
DDV_MinMaxFloat(pDX, m_midterm_coef, 0.f, 1.f);
DDX_Text(pDX, IDC_EDIT_SET_ENDTERM, m_endterm_coef);
DDV_MinMaxFloat(pDX, m_endterm_coef, 0.f, 1.f);
DDX_Text(pDX, IDC_EDIT_SET_NORMAL, m_normal_coef);
DDV_MinMaxFloat(pDX, m_normal_coef, 0.f, 1.f);
DDX_Text(pDX, IDC_EDIT_DSN_NAME, m_dsn_name);
DDX_Text(pDX, IDC_EDIT_TABLE_NAME, m_table_name);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetDialog, CDialog)
//{{AFX_MSG_MAP(CSetDialog)
ON_EN_CHANGE(IDC_EDIT_DSN_NAME, OnChangeEditDsnName)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetDialog message handlers
void CSetDialog::OnChangeEditDsnName()
{
// TODO: Add your control notification handler code here
CString str;//临时字符对象
GetDlgItemText(IDC_EDIT_DSN_NAME,str);
SetDlgItemText(IDC_EDIT_TABLE_NAME,str);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -