CMFCPropertyGridCtrl::Create
Creates a property grid control and attaches it to the property grid control object.
virtual BOOL Create(
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
UINT nID
);
Parameters
[in] dwStyle
A bitwise combination (OR) of window styles.[in] rect
A bounding rectangle that specifies the size and position of the window, in client coordinates of pParentWnd.[in] pParentWnd
Pointer to the parent window. Must not be NULL.[in] nID
The ID of the child window.
Return Value
TRUE if the window was created successfully; otherwise, FALSE.
Remarks
To create a property grid control, first call CMFCPropertyGridCtrl::CMFCPropertyGridCtrl to construct a property grid object. Then call CMFCPropertyGridCtrl::Create.
Example
The following example demonstrates how to use the Create method in CMFCPropertyGridCtrl class. This example is part of the NewControls Sample: MFC Controls Demonstration Application.
// CRect rectPropList
// CMFCPropertyGridCtrl m_wndPropList
// The this pointer points to a CPage5 class which extends the CMFCPropertyPage class.
m_wndPropList.Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rectPropList, this, (UINT)-1);
Requirements
Header: afxpropertygridctrl.h