📄 mydialog.cpp
字号:
// Mydialog.cpp : implementation file
//
#include "stdafx.h"
#include "mfc毕业设计.h"
#include "Mydialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern int max_type;
/////////////////////////////////////////////////////////////////////////////
// CMydialog dialog
CMydialog::CMydialog(CWnd* pParent /*=NULL*/)
: CDialog(CMydialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CMydialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CMydialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMydialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMydialog, CDialog)
//{{AFX_MSG_MAP(CMydialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMydialog message handlers
void CMydialog::OnOK()
{
// TODO: Add extra validation here
CString temp_text;
temp_text.Empty();
max_type=0;
this->GetDlgItemText(IDC_EDIT_INPUT,temp_text);
for(int i=temp_text.GetLength()-1;i>=0;i--)
{
int temp_muti=1;
if(i<temp_text.GetLength()-1)
{
temp_muti*=10;
}
max_type+=(temp_text.GetAt(i)-48)*temp_muti;
}
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -