Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Creates a list control and attaches it to a CListCtrl object.

virtual BOOL Create( 
   DWORD dwStyle, 
   const RECT& rect, 
   CWnd* pParentWnd, 
   UINT nID  


Specifies the list control's style. Apply any combination of list control styles to the control. See List view window styles in the Windows SDK for a complete list of these styles. Set extended styles specific to a control using SetExtendedStyle.


Specifies the list control's size and position. It can be either a CRect object or a RECT structure.


Specifies the list control's parent window, usually a CDialog. It must not be NULL.


Specifies the list control's ID.

Nonzero if successful; otherwise zero.

You construct a CListCtrl in two steps. First, call the constructor and then call Create, which creates the list view control and attaches it to the CListCtrl object.

To apply extended Windows styles to the list control object, call CreateEx instead of Create.

		CRect(10,10,400,200), pParentWnd, IDD_MYLISTCTRL);   

Header: afxcmn.h

© 2015 Microsoft