Click here to Skip to main content
11,567,325 members (48,522 online)
Click here to Skip to main content
Add your own
alternative version

Versatile Tree Control

, 18 Feb 2013 CPOL 27.6K 3K 35
Tree control with custom checkbox with several other features.
customtreectrl.zip
CustomTreeCtrl.exe
CustomTreeCtrlCode.zip
CustomTreeCtrl
1.bmp
2.bmp
CustomTreeCtrl.aps
CustomTreeCtrl.clw
CustomTreeCtrl.dsp
CustomTreeCtrl.dsw
CustomTreeCtrl.opt
CustomTreeCtrl.plg
CustomTreeCtrl.suo
CustomTreeCtrl.vcproj.DEPIND01.nuvsoft31.user
nodrop.cur
res
bitmap1.bmp
bitmap_c.bmp
bitmap_d.bmp
bitmap_e.bmp
bitmap_f.bmp
bitmap_h.bmp
bitmap_m.bmp
bitmap_u.bmp
bmp00003.bmp
bmp00004.bmp
bmp00005.bmp
bmp00006.bmp
bmp00007.bmp
bmp00008.bmp
bmp00009.bmp
bmp00010.bmp
CustomTreeCtrl.ico
icon1.ico
// CustomTreeCtrl.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "CustomTreeCtrl.h"
#include "CustomTreeCtrlDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCustomTreeCtrlApp

BEGIN_MESSAGE_MAP(CCustomTreeCtrlApp, CWinApp)
	//{{AFX_MSG_MAP(CCustomTreeCtrlApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCustomTreeCtrlApp construction

CCustomTreeCtrlApp::CCustomTreeCtrlApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CCustomTreeCtrlApp object

CCustomTreeCtrlApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CCustomTreeCtrlApp initialization

BOOL CCustomTreeCtrlApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	CCustomTreeCtrlDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}

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)

Share

About the Author

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

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 19 Feb 2013
Article Copyright 2013 by Babu_Abdulsalam
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid