第一范文网 - 专业文章范例文档资料分享平台

【毕业论文】基于VC的图的遍历算法的动态演示系统的设计与实现

来源:用户分享 时间:2025/8/9 22:09:35 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

// CDFSearchApp initialization BOOL CDFSearchApp::InitInstance() { }

3.2 CreatGraphDlg.cpp和CreatGraphDlg.h的实现 // CreatGraphDlg.cpp : implementation file #include \标准AFX头文件 #include \#include \#ifdef _DEBUG

#define new DEBUG_NEW // Standard initialization

// If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. CDFSearchDlg dlg; m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); if (nResponse == IDOK) { }

else if (nResponse == IDCANCEL) { }

// Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE;

// TODO: Place code here to handle when the dialog is // dismissed with Cancel // dismissed with OK

// TODO: Place code here to handle when the dialog is

#undef THIS_FILE

static char THIS_FILE[] = __FILE__; #endif

//这是表示,如果生成调试版本,要指示当前文件的名称。__FILE__是一个

宏,在编译器编译过程中给它赋值为当前正在编译的文件名称

// CCreatGraphDlg dialog

CCreatGraphDlg::CCreatGraphDlg(CWnd* pParent /*=NULL*/) { }

CCreatGraphDlg::~CCreatGraphDlg() { }

void CCreatGraphDlg::DoDataExchange(CDataExchange* pDX) { }

//通过宏定义为类添加一个消息,处理函数对组成的数组 BEGIN_MESSAGE_MAP(CCreatGraphDlg, CDialog)

//{{AFX_MSG_MAP(CCreatGraphDlg)

ON_BN_CLICKED(ID_EDIT_POINT, OnEditPoint) ON_BN_CLICKED(ID_EDIT_EDGE, OnEditEdge) ON_BN_CLICKED(ID_SHOW_GRAPH, OnShowGraph) ON_BN_CLICKED(ID_OK, OnOk) CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCreatGraphDlg)

// NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP delete m_pCreatWnd;

//{{AFX_DATA_INIT(CCreatGraphDlg) //}}AFX_DATA_INIT

// NOTE: the ClassWizard will add member initialization here : CDialog(CCreatGraphDlg::IDD, pParent)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

// CCreatGraphDlg message handlers

BOOL CCreatGraphDlg::OnInitDialog() //调用这个成员函数是对WM_INITDIALOG消息作出的反应。

//这条消息是在对话框即将显示之前,在Create,CreateIndirect或DoModal

调用期间发出的。

{ }

void CCreatGraphDlg::OnEditPoint() //编辑点函数,用于在鼠标在图上单机,

就自动创捷结点

CDialog::OnInitDialog();

// TODO: Add extra initialization here

m_pCreatWnd= new CMoveWnd(IDC_GRAPH_CREAT, m_G); m_pCreatWnd->Create(NULL,NULL,WS_CHILD|WS_VISIBLE,recreturn TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return

RECT rect;

t,this,0,NULL);

FALSE

{ }

void CCreatGraphDlg::OnEditEdge() //编辑弧度函数 {

// TODO: Add your control notification handler code here // TODO: Add your control notification handler code here if(m_pCreatWnd->m_Status != 'V') { }

m_pCreatWnd->m_Status = 'V'; m_pCreatWnd->Invalidate();

}

if(m_pCreatWnd->m_Status != 'E') { }

m_pCreatWnd->m_Status = 'E'; m_pCreatWnd->m_From = TRUE; m_pCreatWnd->Invalidate();

void CCreatGraphDlg::OnShowGraph() //该函数用于显示一个图表 { }

void CCreatGraphDlg::OnOk() //OnOk是当用户按OK按钮(ID是IDOK)时

调用。覆盖该函数执行OK按钮动作。

// TODO: Add your control notification handler code here if(m_pCreatWnd->m_Status != 'D') { m_pCreatWnd->m_Status = 'D'; }

m_pCreatWnd->ChangeDWnd(); m_pCreatWnd->m_From = TRUE; m_pCreatWnd->Invalidate();

{ }

void CCreatGraphDlg::OnCancel() //当用户在模态对话框或非模态对话框内

单击Cancel按钮或按ESC键时,窗体调用这个成员函数

// TODO: Add your control notification handler code here CDialog::OnOK();

{ }

// TODO: Add extra cleanup here CDialog::OnCancel();

【毕业论文】基于VC的图的遍历算法的动态演示系统的设计与实现.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c7pfrm5myop1cf865breu5a66i6tmib010vn_6.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top