旅行商dlg.h

来自「tsp问题的小软件」· C头文件 代码 · 共 96 行

H
96
字号
// 旅行商Dlg.h : header file
//

//#include"struct.h"

#if !defined(AFX_DLG_H__EDCDBED0_55BA_469A_9914_EC57B2B116AB__INCLUDED_)
#define AFX_DLG_H__EDCDBED0_55BA_469A_9914_EC57B2B116AB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
	
typedef struct path{
	char hnode;//head node
	char tnode;//tail node
	int length;//length from hnode to tnode
	struct path *next;
}*paths,path;

typedef struct link{
	char node;//节点
	int id;//节点编号
	int fid;//父节点编号
	int flag;//1表已扩展
	int level;//层次
	int fvalue;//f值
	int hvalue;//h值
	int gvalue;//g值
	struct link *next;
}*linklist,link;


class CMyDlg : public CDialog
{
// Construction
public:
	void Circle(int x,int y,int r);
	void Print(linklist temp);
	void visitor(paths P,char schar);

	void PrintPath(linklist close,linklist omin);
	CMyDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMyDlg)
	enum { IDD = IDD_MY_DIALOG };
	CButton	m_outresult;
	CListBox	m_lstout;
	CButton	m_drawpic;
	CButton	m_btsave;
	CButton	m_btexcute;
	CEdit	m_edtinput;
	CButton	m_btclear;
	CButton	m_btinput;
	CListBox	m_lstfile;
	CButton	m_btopen;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtopenfile();
	afx_msg void OnBtclear();
	afx_msg void OnBtinput();
	afx_msg void OnBtsave();
	afx_msg void OnBtexcute();
	afx_msg void OnDraw();
	afx_msg void OnBtoutfile();
	afx_msg void OnDrawpic();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CRect conRect;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLG_H__EDCDBED0_55BA_469A_9914_EC57B2B116AB__INCLUDED_)

⌨️ 快捷键说明

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