ga---mfcview.h

来自「开发环境:Visual C++ .net2003 功能:利用遗传算法求解TSP」· C头文件 代码 · 共 73 行

H
73
字号
// GA---MFCView.h : interface of the CGAMFCView class
//


#pragma once
#include "WSGenAlogrith.h"

class CGAMFCView : public CView
{
protected: // create from serialization only
	CGAMFCView();
	DECLARE_DYNCREATE(CGAMFCView)

// Attributes
public:
	CGAMFCDoc* GetDocument() const;
	

// Operations
public:
	WSGeneticAlogrith* m_pGA;
	//画城市点
	void DrawCity(CDC* pDC, float x, float y);
	//画出所有的城市的点
	void DrawAllCity(CDC* pDC);
	void DrawPath(CDC* pDC);

	//画临时点路径
	void DrawCityLine(CDC* pDC, float x1, float y1, float x2, float y2);
	//画临时点的连接关系
	void DrawCityConnect(CDC* pDC);

	//将float型转化成int型,四舍无入
	int ToInt(float x);

	//直接画出ENA当前图形
	void WSDrawTSP(CDC* pDC);
	//触发画图事件命令接口
	void StartDraw();

	void TextDraw(int x, int y, CString val);
	float m_pTvRate;

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CGAMFCView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in GA---MFCView.cpp
inline CGAMFCDoc* CGAMFCView::GetDocument() const
   { return reinterpret_cast<CGAMFCDoc*>(m_pDocument); }
#endif

⌨️ 快捷键说明

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