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
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 [email protected].

Download demo project – 57 KB

Date Last Updated Posted: February 5, 1999

More by Author

Must Read