共用方式為


CPane::CreateEx

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

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

Parameters

  • [in] dwStyleEx
    Specifies extended window style attributes. For more information, see Extended Window Styles.

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

  • [in] dwStyle
    Specifies 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 for 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 CreateEx, 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