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

📄 mytreeview.h

📁 Visual C++ 实践与提高--数据库篇的源代码。很好的东西。欢迎下载。
💻 H
字号:
// MyTreeView.h : interface of the CMyTreeView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYTREEVIEW_H__EDC18BF6_A50B_11D4_A6D9_0010B54D545E__INCLUDED_)
#define AFX_MYTREEVIEW_H__EDC18BF6_A50B_11D4_A6D9_0010B54D545E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CTRLEXT.H"
class COLEViewerDoc;

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

// Attributes
public:
	COLEViewerDoc* GetDocument();
public:
	//模式对象标识ID
	enum ImageIDS{
		IID_DATABASE = 0,IID_DATABASES,
		IID_TABLE,IID_TABLES,
		IID_FIELD,IID_FIELDS,
		IID_INDEX,IID_INDEXES,
		IID_VIEW,IID_VIEWS,
		IID_PROCEDURE,IID_PROCEDURES,
		IID_FOREIGNKEY, IID_FOREIGNKEYS
	};
protected:
	CTreeCursor tDatabases, tDatabase;
	CTreeCursor tTables, tTable;
	CTreeCursor tView, tProcedures;
protected:
	CImageList m_ctlImage;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyTreeView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void DoPopupMenu(UINT nMenuID);
	CTreeCursor m_ItemSel;
	void PopulateTree();
	void AddItem(WORD nItemType, LPCTSTR lpszName);
	CSession* m_pSession;
	virtual ~CMyTreeView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMyTreeView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnNodeSelect(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	afx_msg void OnPopupCommand(UINT nMenuID);
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MyTreeView.cpp
inline COLEViewerDoc* CMyTreeView::GetDocument()
   { return (COLEViewerDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MYTREEVIEW_H__EDC18BF6_A50B_11D4_A6D9_0010B54D545E__INCLUDED_)

⌨️ 快捷键说明

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