📄 setdoublevaluedlg.cpp
字号:
// SetDoubleValueDlg.cpp : implementation file
//
#include "stdafx.h"
#include "ProgressManamge.h"
#include "SetDoubleValueDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// SetDoubleValueDlg dialog
SetDoubleValueDlg::SetDoubleValueDlg(CString allValue,CString perValue,CWnd* pParent /*=NULL*/)
: CDialog(SetDoubleValueDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(SetDoubleValueDlg)
m_newValue = _T("");
//}}AFX_DATA_INIT
m_oldValue = allValue;
this->allValue = allValue;
this->perValue = perValue;
}
void SetDoubleValueDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(SetDoubleValueDlg)
DDX_Text(pDX, IDC_EDIT_NEW_VALUE, m_newValue);
DDX_Text(pDX, IDC_EDIT_OLD_VALUE, m_oldValue);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(SetDoubleValueDlg, CDialog)
//{{AFX_MSG_MAP(SetDoubleValueDlg)
ON_BN_CLICKED(IDC_SETDOUBLEDLG_RADIO1, OnSetdoubledlgRadio1)
ON_BN_CLICKED(IDC_SETDOUBLEDLG_RADIO2, OnSetdoubledlgRadio2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// SetDoubleValueDlg message handlers
CString SetDoubleValueDlg::getNewValue(){
return m_newValue;
}
int SetDoubleValueDlg::getNewValueFlag(){
return newValueFlag;
}
BOOL SetDoubleValueDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
((CButton* )GetDlgItem(IDC_SETDOUBLEDLG_RADIO1))->SetCheck(TRUE);
newValueFlag =1;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void SetDoubleValueDlg::OnSetdoubledlgRadio1()
{
// TODO: Add your control notification handler code here
if(((CButton* )this->GetDlgItem(IDC_SETDOUBLEDLG_RADIO1))->GetCheck()){
this->m_oldValue = this->allValue;
newValueFlag =1;
}
else{
this->m_oldValue = this->perValue;
newValueFlag =2;
}
UpdateData(FALSE);
}
void SetDoubleValueDlg::OnSetdoubledlgRadio2()
{
if(!((CButton* )this->GetDlgItem(IDC_SETDOUBLEDLG_RADIO2))->GetCheck()){
this->m_oldValue = this->allValue;
newValueFlag =1 ;
}
else{
this->m_oldValue = this->perValue;
newValueFlag =2;
}
UpdateData(FALSE);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -