Condividi tramite


CPane::Create

Creates a control bar and attaches it to the CPane object.

virtual BOOL Create(
    LPCTSTR lpszClassName,
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID,
    DWORD dwControlBarStyle = AFX_DEFAULT_PANE_STYLE,
    CCreateContext* pContext = NULL
);

Parameters

  • [in] lpszClassName
    Specifies the name of the Windows class.

  • [in] dwStyle
    Specifies the window style attributes. For more information, see Window Styles.

  • [in] rect
    Specifies the initial size and position of the pParentWnd window, in client coordinates.

  • [in] [out] pParentWnd
    Specifies the parent window of this pane.

  • [in] nID
    Specifies the ID of the pane.

  • [in] dwControlBarStyle
    Specifies the style for the pane. For more information, see CBasePane::CreateEx.

  • [in] [out] pContext
    Specifies the create context of the pane.

Return Value

TRUE if the pane was created successfully; otherwise, FALSE.

Remarks

This method creates a Windows pane and attaches it to the CPane object.

If you have not explicitly initialized CPane::m_recentDockInfo before you call Create, the parameter rect will be used as the rectangle when floating or docking the pane.

Requirements

Header: afxPane.h

See Also

Reference

CPane Class

Hierarchy Chart

CRecentDockSiteInfo Class

CBasePane::CreateEx