Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CListCtrl::CreateEx 

Creates a control (a child window) and associates it with the CListCtrl object.


virtual BOOL CreateEx(
   DWORD dwExStyle,
   DWORD dwStyle,
   const RECT& rect,
   CWnd* pParentWnd,
   UINT nID 
);

Parameters

dwExStyle

Specifies the extended style of the control being created. For a list of extended Windows styles, see the dwExStyle parameter for CreateWindowEx in the Platform SDK.

dwStyle

Specifies the list control's style. Apply any combination of list control styles to the control. For a complete list of these styles, see List view window styles in the Platform SDK.

rect

A reference to a RECT structure describing the size and position of the window to be created, in client coordinates of pParentWnd.

pParentWnd

A pointer to the window that is the control's parent.

nID

The control's child-window ID.

Nonzero if successful; otherwise 0.

Use CreateEx instead of Create to apply extended Windows styles, specified by the Windows extended style preface WS_EX_.

CreateEx creates the control with the extended Windows styles specified by dwExStyle. To set extended styles specific to a control, call SetExtendedStyle. For example, use CreateEx to set such styles as WS_EX_CONTEXTHELP, but use SetExtendedStyle to set such styles as LVS_EX_FULLROWSELECT. For more information, see the styles described in the topic Extended List View Styles in the Platform SDK.

Community Additions

ADD
Show:
© 2015 Microsoft