Wednesday, January 11, 2006

CListCtrl in MFC

2 ways to use list controls in MFC:
  1. Directly embed CListCtrl object in the dialog class
  2. Indirectly by using the CListView class
CListView makes it easy to integrate with the document/view architecture.

CListCtrl& ctlList = GetListCtrl();

Callback Mask - set of bit values flags which specify the item states for which the application stores the current data
applies to all of the control's items, and is 0 by default

During CListView, the control is created in the view's OnCreate handler function

Using CListCtrl directly is done through the ClassWizard method. ( the not so intuitive classwizard in VC 7 ....phew! )
Using classwizard, add a member variable and declare map handler functions

CImageList - to create one or more image lists


Post a Comment

<< Home