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

📄 linkdlg.cpp

📁 矩阵运算的算法 用Type类数组创建矩阵对象 matrix(int rows,int cols) //创建矩阵,值为0 matrix(int n) //创建单位阵 matrix(c
💻 CPP
字号:
// LinkDlg.cpp : implementation file
//

#include "stdafx.h"
#include "DB05.h"
#include "LinkDlg.h"
#include "IntList.h"

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

/////////////////////////////////////////////////////////////////////////////
// CLinkDlg dialog


CLinkDlg::CLinkDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CLinkDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CLinkDlg)
	m_Nodenum = 0;
	m_data = 0;
	m_currentdate = 0;
	m_current = _T("");
	m_next = _T("");
	//}}AFX_DATA_INIT
}


void CLinkDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CLinkDlg)
	DDX_Text(pDX, IDC_EDIT1, m_Nodenum);
	DDV_MinMaxInt(pDX, m_Nodenum, 0, 99);
	DDX_Text(pDX, IDC_EDIT2, m_data);
	DDX_Text(pDX, IDC_EDIT4, m_currentdate);
	DDX_Text(pDX, IDC_EDIT3, m_current);
	DDX_Text(pDX, IDC_EDIT5, m_next);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CLinkDlg, CDialog)
	//{{AFX_MSG_MAP(CLinkDlg)
	ON_BN_CLICKED(IDC_RADIO1, OnRadioHcreat)
	ON_BN_CLICKED(IDC_RADIO_Init, OnRADIOInit)
	ON_BN_CLICKED(IDC_RADIO_Swap, OnRADIOSwap)
	ON_BN_CLICKED(IDC_RADIO_First, OnRADIOFirst)
	ON_BN_CLICKED(IDC_RADIO_Next, OnRADIONext)
	ON_BN_CLICKED(IDC_RADIO_Null, OnRADIONull)
	ON_BN_CLICKED(IDC_RADIO_Edit, OnRADIOEdit)
	ON_BN_CLICKED(IDC_RADIO_Insert, OnRADIOInsert)
	ON_BN_CLICKED(IDC_RADIO_Delete, OnRADIODelete)
	ON_BN_CLICKED(IDC_RADIO_before, OnRADIObefore)
	ON_BN_CLICKED(IDC_RADIO_back, OnRADIOback)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLinkDlg message handlers

BOOL CLinkDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}



void CLinkDlg::OnRADIOInit() 
{UpdateData();
 Linklist list;
 int nId=GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO2);
 if(nId=IDC_RADIO1)
	{list.CreatListH(m_Nodenum);}
 if(nId=IDC_RADIO2)
	{list.CreatListR(m_Nodenum);}
}

void CLinkDlg::OnRADIOSwap() 
{   Linklist list;
	list.Swaplist();
}

void CLinkDlg::OnRADIOFirst() 
{  Linklist list;
	list.First();	
}

void CLinkDlg::OnRADIONext() 
{ Linklist list;
list.Next();
m_current.Format("%6.2f",list.Get());
m_currentdate=list.Getdata();
m_next.Format("6.2f",list.GetNext());
	
}

void CLinkDlg::OnRADIONull() 
{   Linklist list;
	list.MakeEmpty();
}

void CLinkDlg::OnRADIOEdit() 
{  Linklist list;
list.Put(m_data);
	
}

void CLinkDlg::OnRADIOInsert() 
{   Linklist list;
	if(InsertNum)
	{list.InsertBack(m_data);}
	else
	{list.InsertBefore(m_data);}	
}

void CLinkDlg::OnRADIODelete() 
{
	// TODO: Add your control notification handler code here
	
}

void CLinkDlg::OnRADIObefore() 
{
InsertNum=0;	
}

void CLinkDlg::OnRADIOback() 
{
InsertNum=1;
	
}

⌨️ 快捷键说明

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