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

📄 bfsearchdlg.h

📁 数据结构(C++版)的演示程序
💻 H
字号:
// BFSearchDlg.h : header file
//

#if !defined(AFX_BFSEARCHDLG_H__1BFDC0AE_4B06_417B_8837_4468591D105D__INCLUDED_)
#define AFX_BFSEARCHDLG_H__1BFDC0AE_4B06_417B_8837_4468591D105D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "afxmt.h"
#include "stdafx.h"
#include "TextWnd.h"
#include "MoveWnd.h"
#include "Queue.h"
#include "CreatGraphDlg.h"

/////////////////////////////////////////////////////////////////////////////
// CBFSearchDlg dialog

class CBFSearchDlg : public CDialog
{
// Construction
public:
	CBFSearchDlg(CWnd* pParent = NULL);	// standard constructor
	~CBFSearchDlg();


	CCreatGraphDlg m_dlg;
    CGraph    *G;
    CQueue    *m_pQ;

    void graphTraverse(CGraph *G);                //要演示的程序
	void BFS(CGraph *G, int start, CQueue *Q);    //要演示的程序

	CDialog *GetDlg();
	void    SetCodeSentence();
	void    SetMoveValue();
	void    ResetCodeSentence();
	void    ResetQueueSentence();
	void	ResetMoveWnd();
	void    SetCode(int pos);
	BOOL    SetValue(int start, int v, int w, int n, int length, int markV, int firstV, int nextV);
	CString m_Queue_Str;
	void    enQueue(CString CallStr, int v);
	void    deQueue();
	
	CWinThread	*m_pShowThread;
	CEvent		mStepEvent;
	BOOL        mExist, mAuto, mEnd, m_Break;
	int         m_lastV;
	CTextWnd	*m_pCodeDisplayWnd;					// 源程序显示框
	CTextWnd	*m_pQueueDisplayWnd;				// 堆栈显示框
	CMoveWnd	*m_pMoveDisplayWnd;				// 堆栈显示框
//	CString	    ValueShow;							// 变量值显示


// Dialog Data
	//{{AFX_DATA(CBFSearchDlg)
	enum { IDD = IDD_BFSEARCH_DIALOG };
	CString	m_ValueShow1;
	CString	m_ValueShow2;
	CString	m_ValueShow3;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CBFSearchDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnAutoStep();
	afx_msg void OnSingleStep();
	afx_msg void OnEndShow();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_BFSEARCHDLG_H__1BFDC0AE_4B06_417B_8837_4468591D105D__INCLUDED_)

⌨️ 快捷键说明

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