Click here to Skip to main content
13,248,562 members (81,889 online)
Click here to Skip to main content


74 bookmarked
Posted 16 Mar 2006

TreeCtrl - A WTL tree control with Windows Vista style item selection

, 9 Apr 2006
A WTL tree control that supports Windows Vista style selection and multiple selection.
// TreeCtrlDemo.cpp : main source file for TreeCtrlDemo.exe

#include "stdafx.h"

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>

#include "resource.h"

#include "MainDlg.h"

CAppModule _Module;

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
	HRESULT hRes = ::OleInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to 
// make the EXE free threaded. This means that calls come in on a random RPC thread.

	// this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
	::DefWindowProc(NULL, 0, 0, 0L);

	AtlInitCommonControls(ICC_BAR_CLASSES);	// add flags to support other controls

	hRes = _Module.Init(NULL, hInstance);

	int nRet = 0;
	// BLOCK: Run application
		CMainDlg dlgMain;
		nRet = dlgMain.DoModal();


	return nRet;

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

United Kingdom United Kingdom
Alan has been developing applications for a very long time (~10 years), but he's not bitter about this at all. My main area of expertise is C++. He lives in Sweden with his beautiful wife, daughter and son and enjoys climbing mountains and kayaking in his spare time (which isn't much).

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171114.1 | Last Updated 10 Apr 2006
Article Copyright 2006 by AlanW
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid