Creating an Object Property List using the CListCtrl | CodeGuru

Creating an Object Property List using the CListCtrl

************************************************************************************ Special Note: This Demo was inspired by the work of Matt Gullett,   “A Property List Control”. ************************************************************************************ The following is a result of my attempt to create a control that would allow an application to add objects to that control. These objects need not share the same properties. This control is a CListCtrl derived […]

Written By
CodeGuru Staff
CodeGuru Staff
Feb 5, 1999
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

************************************************************************************

Special Note: This Demo was inspired by the work of Matt
Gullett,   “A Property List Control”.

************************************************************************************

The following is a result of my attempt to create a
control that would allow an application to add objects to that control. These
objects need not share the same properties. This control is a CListCtrl derived
class. Benefits of this control are that it allows its user to place this
control in any dialog box. Functions are provided which allow the user to
add/remove items within the control. The information within the fields of the
control can all be accessed individually.

The code was written in Visual C++ 6.0.

How to Use:

First Copy MyListCtrl.cpp, MyListCtrl.h and IDB_BITMAP to
your project workspace.

Within your dialog header file #include the file
“MyListCtrl.h”. Add a CListCtrl to your dialog box. Redefine the
CListCtrl as a CMyListCtrl.

Examples of how to add a field to the control and how to
get information from those fields can be found in the file MyListCtrlDlg.cpp.
Though using this control should be simple and straightforward, any question,
suggestions or problems can be forwarded to me at marlont@worldnet.att.net.

Download demo project – 57 KB

Date Last Updated Posted: February 5, 1999

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.