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

📄 familytreedlg.h

📁 数据结构——家谱的实现 本人的课程设计 MFC
💻 H
字号:
// FamilytreeDlg.h : header file
//

#if !defined(AFX_PEDIGREEDLG_H__F5511729_5C3D_476B_8FB9_1BB1420ED2F6__INCLUDED_)
#define AFX_PEDIGREEDLG_H__F5511729_5C3D_476B_8FB9_1BB1420ED2F6__INCLUDED_

#include "OperationFamilytree.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CFamilytreeDlg dialog

class CFamilytreeDlg : public CDialog
{
// Construction
public:
	void SaveTip();                                         //保存提示
	void InitListCtrl();									//初始化列表控件
	void RefreshTree();										//刷新树,(即刷新显示)
	void RefreshList();										//刷新列表
	void DisplayFamilytree(Person& pNode);					//显示树
	void DisplayInListCtrl(Person pNode);					//把pNode结点的信息在列表控件中显示出来
    void Display(CString temp);
	void FindInTree(HTREEITEM& hRootItem,HTREEITEM& hItem,char* name);//在树hRootItem中查找name所在结点,如找到,把其结点句柄存入hItem中,找不到,hItem为0
	                                                                  //注意,使用该函数时,确保hItem初值为0
	void BirthdayTip();										//每次打开一新家谱文件时的生日提示
	void DisplayGenerationInfo(Person& pNode,bool& flag,int count,int generation);//显示所有第generation代人的信息
	void AddToTree(HTREEITEM hParentItem,Person addnode);	//把addnode加入到树的hParentItem结点中去
	CFamilytreeDlg(CWnd* pParent = NULL);		// standard constructor

// Dialog Data
	//{{AFX_DATA(CFamilytreeDlg)
	enum { IDD = IDD_PEDIGREE_DIALOG };
	CListCtrl	m_peList;
	CTreeCtrl	m_peTree;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CFamilytreeDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnHelpFamilytree();
	afx_msg void OnFileExit();
	afx_msg void OnFileOpen();
	afx_msg void OnFileSave();
	afx_msg void OnFamilytreeAdd();
	afx_msg void OnFamilytreeDelete();
	afx_msg void OnFamilytreeModify();
	afx_msg void OnSelchangedTreeFamilytree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnFamilytreeRelations();
	afx_msg void OnFamilytreePersonalInfo();
	afx_msg void OnFamilytreeIgenerationInfo();
	afx_msg void OnAdd();
	afx_msg void OnDelete();
	afx_msg void OnModify();
	afx_msg void OnFamilytreeSort();
	afx_msg void OnFileSaveas();
	afx_msg void OnFileNew();
	afx_msg void OnBirthday();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	char savepath[MAX_CHARNUM];				//家谱第一次被保存时的路径
	bool IsFamilytreeModified;				//家谱是否被修改标记 
	COperationFamilytree operFamilytree;		//对家谱操作的一个类实例,所有的家谱操作均由它调用成员函数来完成
};

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

#endif // !defined(AFX_PEDIGREEDLG_H__F5511729_5C3D_476B_8FB9_1BB1420ED2F6__INCLUDED_)

⌨️ 快捷键说明

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