⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 correinfo.cpp

📁 数据结构链表的演示程序
💻 CPP
字号:
// CorreInfo.cpp : implementation file
//

#include "stdafx.h"
#include "LandSoft.h"
#include "CorreInfo.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCorreInfo dialog


CCorreInfo::CCorreInfo(CWnd* pParent ,CString strTypeName,UINT maxdist,UINT dist,
					   UINT range,UINT boxlong)
	: CDialog(CCorreInfo::IDD, pParent)
{
	m_nMaxDistant=maxdist;
	m_nBoxlong=boxlong;
	//{{AFX_DATA_INIT(CCorreInfo)
	m_nDistant = dist;
	m_nRange = range;
	m_strType = strTypeName;
	//}}AFX_DATA_INIT
}


void CCorreInfo::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCorreInfo)
	DDX_Text(pDX, IDC_EDIT_DISTANT, m_nDistant);
	DDV_MinMaxUInt(pDX, m_nDistant, 1, 9999);
	DDX_Text(pDX, IDC_EDIT_RANGE, m_nRange);
	DDV_MinMaxUInt(pDX, m_nRange, 1, 9999);
	DDX_Text(pDX, IDC_STATIC_TYPE, m_strType);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCorreInfo, CDialog)
	//{{AFX_MSG_MAP(CCorreInfo)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCorreInfo message handlers

void CCorreInfo::OnOK() 
{
	UpdateData(TRUE);
	if(m_nDistant<m_nRange||(m_nDistant-m_nRange)>m_nMaxDistant)
	{
		AfxMessageBox("范围越界,请重新输入!",MB_OK,NULL);
		return;
	}
	else if((m_nDistant+m_nRange)<m_nBoxlong)
	{
		AfxMessageBox("所给的距离范围找不到点对,请重新输入!",MB_OK,NULL);
		return;
	}
	CDialog::OnOK();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -