Click to See Complete Forum and Search --> : Implementing a CListCtrl in a CPropertyPage


DanielF
April 8th, 1999, 02:32 AM
Hi All,

I'm having difficulty implementing a CListCtrl in a CPropertyPage. Specifically I can't add a column to the List Control. The CListCtrl is a public variable of my CPropertyPage derived class. I think perhaps I'm using the CListCtrl::Create function incorrectly or perhaps trying to create the column in the wrong place. Currently I'm creating the column during the CPropertyPage derived class's constructor.

Any help would really be appreciated.

Thank You

Daniel.

Karl
April 8th, 1999, 03:47 AM
If you have created your PropertyPage with a Dialog Resource, you may have used ClassWizard to implement a CListCtrl variable corresponding to the resource you want. So you don't have to create explicitly the ListCtrl. To initialize your ListCtrl, override OnInitDialog and do it there, after the call to base class.

HTH.

K.

Ash to ash and clay to clay, if the enemy doesn't get you, your own folk may.

speighd
April 8th, 1999, 08:41 AM
Create the CListCtrl in the resource editor and in the OnSetActive methode use m_listCtrl.InsertColumn (for CListCtrl m_listCtrl).

Shahzad
April 8th, 1999, 08:52 AM
Make the CListCtrl in the property page dialog (with resourse editor) and initialize it in on ONINITDIALOG. Put columns and any initial data in the control there.