📄 insertdialog.cpp
字号:
// InsertDialog.cpp : implementation file
//
#include "stdafx.h"
#include "gear.h"
#include "InsertDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CInsertDialog dialog
CInsertDialog::CInsertDialog(CWnd* pParent /*=NULL*/)
: CDialog(CInsertDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CInsertDialog)
z=0;
m=0.0;
a=0.0;
b=0.0;
w=0.0;
num = _T("");
//}}AFX_DATA_INIT
}
void CInsertDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CInsertDialog)
DDX_Control(pDX, IDC_EDIT3, m_num);
DDX_Control(pDX, IDC_EDIT4, m_m);
DDX_Control(pDX, IDC_EDIT5, m_z);
DDX_Control(pDX, IDC_EDIT6, m_a);
DDX_Control(pDX, IDC_EDIT7, m_b);
DDX_Control(pDX, IDC_EDIT8, m_w);
DDX_Text(pDX, IDC_EDIT3, num);
DDX_Text(pDX, IDC_EDIT4, m);
DDX_Text(pDX, IDC_EDIT5, z);
DDX_Text(pDX, IDC_EDIT6, a);
DDX_Text(pDX, IDC_EDIT7, b);
DDX_Text(pDX, IDC_EDIT8, w);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CInsertDialog, CDialog)
//{{AFX_MSG_MAP(CInsertDialog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CInsertDialog message handlers
BOOL CInsertDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
if(mark==0)
{
this->GetDlgItem(IDC_EDIT3)->EnableWindow(TRUE);
this->SetWindowText("入库");
this->GetDlgItem(IDC_STATIC_A)->SetWindowText("入库");
this->GetDlgItem(IDC_EDIT3)->SetWindowText("");
this->GetDlgItem(IDC_EDIT4)->SetWindowText("");
this->GetDlgItem(IDC_EDIT5)->SetWindowText("");
this->GetDlgItem(IDC_EDIT6)->SetWindowText("");
this->GetDlgItem(IDC_EDIT7)->SetWindowText("");
this->GetDlgItem(IDC_EDIT8)->SetWindowText("");
}
else
{ this->GetDlgItem(IDC_EDIT3)->EnableWindow(FALSE);
this->SetWindowText("修改");
this->GetDlgItem(IDC_STATIC_A)->SetWindowText("修改");
this->GetDlgItem(IDC_EDIT3)->SetWindowText(str[0]);
this->GetDlgItem(IDC_EDIT4)->SetWindowText(str[1]);
this->GetDlgItem(IDC_EDIT5)->SetWindowText(str[2]);
this->GetDlgItem(IDC_EDIT6)->SetWindowText(str[3]);
this->GetDlgItem(IDC_EDIT7)->SetWindowText(str[4]);
this->GetDlgItem(IDC_EDIT8)->SetWindowText(str[5]);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -