CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Location
    South Africa
    Posts
    46

    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.


  2. #2
    Join Date
    May 1999
    Location
    Toulouse, France
    Posts
    171

    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.
    We're talking ****, 'cause life is a 'biz
    You know it is
    Everybody tryin' to get rich
    God ****!
    All I wanna do is live !

    KoRn, Children of the Korn

  3. #3
    Join Date
    Apr 1999
    Location
    North Carolina
    Posts
    6

    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).


  4. #4
    Join Date
    May 1999
    Posts
    388

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured