Click here to Skip to main content
15,881,172 members
Articles / Desktop Programming / MFC

Versatile Tree Control

Rate me:
Please Sign up or sign in to vote.
4.92/5 (16 votes)
18 Feb 2013CPOL12 min read 77.8K   5.9K   44  
Tree control with custom checkbox with several other features.
// CItemNameDlg.cpp : implementation file
//

#include "stdafx.h"
#include "CustomTreeCtrl.h"
#include "CItemNameDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CItemNameDlg dialog


CItemNameDlg::CItemNameDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CItemNameDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CItemNameDlg)
	m_sItemName = _T("New");
	//}}AFX_DATA_INIT
}


void CItemNameDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CItemNameDlg)
	DDX_Text(pDX, IDC_EDIT_NAME, m_sItemName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CItemNameDlg, CDialog)
	//{{AFX_MSG_MAP(CItemNameDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CItemNameDlg message handlers

void CItemNameDlg::OnOK() 
{
	// TODO: Add extra validation here
	CDialog::OnOK();
}

void CItemNameDlg::OnCancel() 
{
	// TODO: Add extra cleanup here
	CDialog::OnCancel();
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India
I'm working as Senior software Engineer since 7 years and interested in MFC and COM programming.

Comments and Discussions