Tree List Control | CodeGuru

Tree List Control

The accompanying code is an implementation of a tree view, combined with a list view, for the Windows API. The view is compatible to the tree control of the common controls. It allows the user to set colors, text, and icons for each item separately. An MFC class for the view is also implemented. Features […]

Written By
CodeGuru Staff
CodeGuru Staff
Feb 15, 2007
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

The accompanying code is an implementation of a tree view, combined with a list view, for the Windows API. The view is compatible to the tree control of the common controls. It allows the user to set colors, text, and icons for each item separately. An MFC class for the view is also implemented.

Features

  • The window messages are compatible with the tree control of the common controls.
  • Alternating colors are provided for each line.
  • The color, style, and icon could be set for each item separately.
  • An MFC class is also implemented (CTreeCtrl is the base class).
  • An index access is implemented so that you can get the item of a line.

The main source code is in the TreeListWnd.cpp file. The MFC class is in the TreeListCtrl.cpp file.

This demo was written by Anton Zechner.

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.