📄 dialog2.cpp
字号:
// Dialog2.cpp : implementation file
//
#include "stdafx.h"
#include "caoyuting.h"
#include "Dialog2.h"
#include "Dialog3.h"
#include "Dialog1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CCaoyutingApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CDialog2 dialog
CDialog2::CDialog2(CWnd* pParent /*=NULL*/)
: CDialog(CDialog2::IDD, pParent)
{
//{{AFX_DATA_INIT(CDialog2)
m_name = _T("");
//}}AFX_DATA_INIT
}
void CDialog2::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDialog2)
DDX_Text(pDX, IDC_EDIT1, m_name);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDialog2, CDialog)
//{{AFX_MSG_MAP(CDialog2)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDialog2 message handlers
void CDialog2::OnButton1()
{
// TODO: Add your control notification handler code here
bool i=false;
UpdateData(true);
for(int j=0;j<theApp.n;j++)
if (m_name==theApp.nam[j])
{
i=true;
theApp.str1=theApp.str[j];
}
if(i==true)
{
CDialog3 dialog3;
dialog3.DoModal();
}
else
{
CDialog1 dialog1;
dialog1.m_cOut.AddString(m_name);
}
CDialog2::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -