Click here to Skip to main content
13,005,973 members (66,991 online)
Click here to Skip to main content


36 bookmarked
Posted 5 Jun 2001

Tree control templates

Three tree control templates to easily operate with CTreeCtrl derived objects
// PruebaPTreeDlg.h : header file

#if !defined(AFX_PRUEBAPTREEDLG_H__8FF80297_D67E_421C_8938_35095D0CB446__INCLUDED_)
#define AFX_PRUEBAPTREEDLG_H__8FF80297_D67E_421C_8938_35095D0CB446__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TCExpand.h"
#include "TCPersist.h"
#include "TCIterator.h"

// CPruebaPTreeDlg dialog

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

// Dialog Data
	CListBox	mc_lbItems;
	TTCIterator<TTCPersist<TTCExpand<CTreeCtrl> > >	mc_tcTree;

	// ClassWizard generated virtual function overrides
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	void PopulateTree();

// Implementation
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtCollapse();
	afx_msg void OnBtExpand();
	afx_msg void OnBtReload();
	afx_msg void OnBtIterateDeep();
	afx_msg void OnBtIterateWidth();

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

#endif // !defined(AFX_PRUEBAPTREEDLG_H__8FF80297_D67E_421C_8938_35095D0CB446__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Francisco José Sen del Prado
Software Developer (Senior)
Spain Spain
I started programming in Basic language when I was 14 years old. The second programming language I learned was Z80 assembler. I've been programming with C++ for the last 20 years. I attended the 2012 C++ Now event in Aspen and it was the most exciting experience I've lived in my professional life. I met a lot of brilliant C++ minds and I have very good memories from that trip.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170628.1 | Last Updated 12 Jun 2001
Article Copyright 2001 by Francisco José Sen del Prado
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid