Click here to Skip to main content
15,896,912 members
Articles / Desktop Programming / MFC

My Tree Control

Rate me:
Please Sign up or sign in to vote.
1.09/5 (11 votes)
10 Nov 20052 min read 66.8K   1.5K   21  
A tree control that is like a template and stores items.
#ifndef __CNewWizPage__
#define __CNewWizPage__

#include "../resource.h"
class CNewWizDialog;

/////////////////////////////////////////////////////////////////////////////
// CNewWizPage dialog

#ifdef DLL_EXPORT
class __declspec(dllexport) CNewWizPage : public CDialog
#else
class __declspec(dllimport) CNewWizPage : public CDialog
#endif
{
  friend class CNewWizDialog;

// Construction
public:
	CNewWizPage(CWnd* pParent = NULL){}   // standard constructor

	CNewWizPage(LPCTSTR lpszTemplateName, CWnd* pParent = NULL);
  CNewWizPage(UINT nIDTemplate, CWnd* pParent = NULL);
  virtual ~CNewWizPage();

  enum{IDD = IDW_WIZPAGEDLG};

// Attributes
public:
	CFont m_LargeFont; // a large font for any titles we may want

protected:
	CBrush m_Brush; // brush for white background
  CNewWizDialog *m_pParent; // Parent dialog

private:
  BOOL m_bCreated; // flag to tell us if the dialog has been created
  BOOL m_bActive;		// flag to tell is if the dialog is the active page
  UINT m_nDialogID; // resource ID for thie page


// Operations
public:
  virtual BOOL OnCreatePage();
  virtual void OnDestroyPage();

	// these functions are the same as CPropertyPage
	virtual void OnCancel();
  virtual BOOL OnKillActive();
  virtual void OnSetActive();
	virtual BOOL OnQueryCancel( );
	virtual LRESULT OnWizardBack();
	virtual LRESULT OnWizardNext();
	virtual BOOL OnWizardCheckBeforeFinish();
	virtual BOOL OnWizardFinish();


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNewWizPage)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CNewWizPage)
	virtual BOOL OnInitDialog();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions