SECLayoutDockFactory::CreateDockableNode
Create a dockable layout node
Defined in: DockFactory.cpp
Syntax
CreateDockableNode(CWnd* pParentWnd,const SECLayoutNodeClassFactory& classNode,LPCTSTR lpszTitle=NULL,SECLayoutNode** ppNode=NULL,DWORD dwGripperStyle=0)
CreateDockableNode(SECLayoutNode* pParentNode,CWnd* pParentWnd,const SECLayoutNodeClassFactory& classNode,LPCTSTR lpszTitle=NULL,SECLayoutNode** ppNode=NULL,DWORD dwGripperStyle=0)
Return Value
Pointer to the docking wrapper of the newly created node. Memory management is automatic, caller should *not* deallocate.
Parameters
pParentWnd
Parent window of the new dockable node
pParentNode
Parent layout node of newly created dockable node.
classNode
Runtime class name for dockable node instantiation. Caller can utilize the NODE_CLASS(ClassName) macro for parameter passing.
lpszTitle
Title for this docking wrapper. The title will be displayed when floating.
ppNode
Back pointer to the nested newly created node in case furher initialization is needed. Use NODEBP(ptr) macro as shown in example below.
dwGripperStyle
This flag is currently unused and reserved for future growth.
Comments
This function will create a new layout node and wrap it in a dockable gripper wrapper. The dockable gripper wrapper is returned and should be utilized in any docking operation. The ppNode back pointer is provided if further customization of the newly created node is required.
Example
CMyLayoutNode* pNestedNonDockableNode=NULL;
SECLayoutNode* pDockableNode=m_LFactory.CreateDockableNode(pParentWnd,NODE_CLASS(CMyLayoutNode),_T("My Title"),NODEBP(pNestedNonDockableNode));
if(!pDockableNode) return FALSE;
ASSERT(pNestedNonDockableNode); // must exist if pDockableNode was properly created
pNestedNonDockableNode->DoSomeFurtherCustomization();
m_dockFeat.DockNode(pDockableNode);
See Also