Click here to Skip to main content
15,885,216 members
Articles / Desktop Programming / MFC

Custom Drawn Vertical Tree Control

Rate me:
Please Sign up or sign in to vote.
4.93/5 (39 votes)
14 Oct 20053 min read 148.1K   3.3K   107  
A CTreeCtrl derived class which is both: a normal CTreeCtrl or a fully custom drawn vertical tree control
// VerticalTreeDlg.h : Header-Datei
//

#if !defined(AFX_VERTICALTREEDLG_H__2AD89464_660C_4E88_90F5_AC528E734BFD__INCLUDED_)
#define AFX_VERTICALTREEDLG_H__2AD89464_660C_4E88_90F5_AC528E734BFD__INCLUDED_

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


#include "CustomVerticalTree.h"

/////////////////////////////////////////////////////////////////////////////
// CVerticalTreeDlg Dialogfeld

class CVerticalTreeDlg : public CDialog
{
// Konstruktion
public:
	CVerticalTreeDlg(CWnd* pParent = NULL);	// Standard-Konstruktor

// Dialogfelddaten
	//{{AFX_DATA(CVerticalTreeDlg)
	enum { IDD = IDD_VERTICALTREE_DIALOG };
	CVerticalTree	m_TestTree;
	//}}AFX_DATA

	// Vom Klassenassistenten generierte �berladungen virtueller Funktionen
	//{{AFX_VIRTUAL(CVerticalTreeDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV-Unterst�tzung
	//}}AFX_VIRTUAL

// Implementierung
protected:
	void FillTree(TV_INSERTSTRUCT &treeitem, int depth = 2);
	HICON m_hIcon;

	// Generierte Message-Map-Funktionen
	//{{AFX_MSG(CVerticalTreeDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButCustom();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f�gt unmittelbar vor der vorhergehenden Zeile zus�tzliche Deklarationen ein.

#endif // !defined(AFX_VERTICALTREEDLG_H__2AD89464_660C_4E88_90F5_AC528E734BFD__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.


Written By
Chief Technology Officer W3L
Germany Germany
-Since 1th August 2007: Chief Technology Officer of W3L
-2002/08/01-2007/07/31: PhD student
-1997/10/15-2002/07/31: Studied Electrical Engineering and Computer Science

Comments and Discussions