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

📄 treeview.h

📁 API经典入门
💻 H
字号:
// treeview.h : interface of the CTreeView class
//
/////////////////////////////////////////////////////////////////////////////

class CTreeSet;

class CTreeView : public CRecordView
{
protected: // create from serialization only
	CTreeView();
	DECLARE_DYNCREATE(CTreeView)

public:
	//{{AFX_DATA(CTreeView)
	enum { IDD = IDD_TREE_FORM };
	CComboBox	m_ctlSpouses;
	CListBox	m_ctlSiblings;
	CListBox	m_ctlChildren;
	CTreeSet* m_pSet;
	CString	m_strFather;
	CString	m_strMGFather;
	CString	m_strMGMother;
	CString	m_strMother;
	CString	m_strPGFather;
	CString	m_strPGMother;
	//}}AFX_DATA

// Attributes
public:
	CTreeDoc* GetDocument();

// Operations
public:
	virtual CRecordset* OnGetRecordset();
	virtual BOOL OnMove(UINT nIDMoveCommand);
	void UpdateRelatives();

private:
	// reset view's member string names to a constant ("?????")
	void ResetStrings();
	
	// given an open CTreeSet object with a filter parameterized as
	// "ID = ?" and a subject ID, GetMomDad will find and pass back
	// the full names of the subject's mom & dad.
	void GetMomDad( CTreeSet* pSet, double fSubjectID,
				CString& strMom, CString& strDad);
				
	// The following three functions will fill their respective control
	// with the appropriate information.
	void FillSpouses();
	void FillChildren();
	void FillSiblings();

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

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);

	// Printing support
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Generated message map functions
protected:
	//{{AFX_MSG(CTreeView)
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnDblclkChildren();
	afx_msg void OnDblclkSiblings();
	afx_msg void OnDblclkSpouses();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in treeview.cpp
inline CTreeDoc* CTreeView::GetDocument()
   { return (CTreeDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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