Microsoft KB Archive/248496

From BetaArchive Wiki

SAMPLE: CustDTv Illustrates Custom Draw in a TreeView


The information in this article applies to:

  • Microsoft Platform Software Development Kit (SDK), on platform(s):
    • Microsoft Windows 98
    • Microsoft Windows 95
    • Microsoft Windows NT Server version 4.0
    • Microsoft Windows NT Workstation version 4.0
    • the operating system: Microsoft Windows 2000


Version 4.70 of Comctl32.dll introduced the concept of custom draw, which allows the developer to customize the drawing of certain controls without having to implement full owner-draw. Controls such as ListView, TreeView, Tab, and ToolTips support the custom draw feature, to varying degrees.

CustDTv.exe is a sample that demonstrates how to implement custom draw for a TreeView control. It displays how to color text for each item, specify a font for each item, and display text adjacent to the item text.


The following file is available for download from the Microsoft Download Center:


For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

Q119591 How to Obtain Microsoft Support Files from Online Services

Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

Additional query words: custdtv

Keywords : kbfile kbsample kbOSWinNT400 kbOSWin2000 kbSDKWin32 kbTreeView kbOSWin95 kbOSWin98 kbDSupport
Issue type : kbhowto
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch

Last Reviewed: December 15, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.