Implementing a CListCtrl in a CPropertyPage
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.
Re: Implementing a CListCtrl in a CPropertyPage
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.
Re: Implementing a CListCtrl in a CPropertyPage
Create the CListCtrl in the resource editor and in the OnSetActive methode use m_listCtrl.InsertColumn (for CListCtrl m_listCtrl).
Re: Implementing a CListCtrl in a CPropertyPage
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.