📄 dcl.cpp
字号:
// DCL.cpp : implementation file
//
#include "stdafx.h"
#include "ClassDllTest2.h"
#include "DCL.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DCL dialog
DCL::DCL(CWnd* pParent /*=NULL*/)
: CDialog(DCL::IDD, pParent)
{
//{{AFX_DATA_INIT(DCL)
m_Radial = 0.0;
m_Height = 0.0;
m_Area = 0.0;
m_Volumn = 0.0;
//}}AFX_DATA_INIT
}
void DCL::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DCL)
DDX_Control(pDX, IDC_BUTTON2, m_ReCal);
DDX_Control(pDX, IDC_BUTTON1, m_Cal);
DDX_Text(pDX, IDC_EDIT1, m_Radial);
DDX_Text(pDX, IDC_EDIT2, m_Height);
DDX_Text(pDX, IDC_EDIT3, m_Area);
DDX_Text(pDX, IDC_EDIT4, m_Volumn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DCL, CDialog)
//{{AFX_MSG_MAP(DCL)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DCL message handlers
void DCL::OnButton1()
{
UpdateData(TRUE);
column.SetRadial(m_Radial);
column.SetHeight(m_Height);
m_Area=column.GetArea();
m_Volumn=column.GetVolumn();
UpdateData(FALSE);
m_Cal.EnableWindow(FALSE);
m_ReCal.EnableWindow(TRUE);
GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE);
GetDlgItemd(IDC_EDIT2)->EnableWindow(FALSE);
// TODO: Add your control notification handler code here
}
void DCL::OnButton2()
{
m_Cal.EnableWindow(TRUE);
m_ReCal.EnableWindow(FALSE);
GetDlgItem(IDC_EDIT1)->EnableWindow(TRUE);
GetDlgItemd(IDC_EDIT2)->EnableWindow(TRUE);
m_Area=0;
m_Volumn=0;
UpdateDate(FALSE);
// TODO: Add your control notification handler code here
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -