SECFrameDockingFeatureBase::EnableDocking

BOOLSECFrameDockingFeatureBase::EnableDocking(CWnd*pParent, DWORDdwDockStyle, BOOLbCreateNewLocalDockMgr, SECLNDockingMgrpMgr)

Enable docking to the specified borders

Defined in: FrameDockBase.cpp

Return Value

TRUE on successful initialization, otherwise FALSE

Parameters

pParent

Associated parent window for which docking is enabled.

dwDockStyle

Valid docking borders. Can be 1 or more of the following:

SEC_DOCK_LEFT - Dock to the left border of the frame
SEC_DOCK_TOP - Dock to the top border of the frame
SEC_DOCK_RIGHT - Dock to the right border of the frame
SEC_DOCK_BOTTOM - Dock to the bottom border of the frame
SEC_DOCK_HORZ - Dock to the left or right borders of the frame
SEC_DOCK_VERT - Dock to the top or bottom borders of the frame
SEC_DOCK_ANY- Dock to any border of the frame (default)

bCreateNewLocalDockMgr

Automatically create a local docking manager. If a local docking manager is created, then nodes docked to this docking feature will not be able to dock to any other docking features. This is typically used inside MDI children, to prevent docking with other frame windows.

pMgr

Docking manager to associate with this feature. You can use the same manager for multiple dock features (1 feature per frame) to configure docking between specific windows. If this parameter is defined, bCreateNewLocalDockMgr is ignored.

Comments

This function must be called to initialize the docking state of a frame docking feature. If bCreateNewLocalDockMgr is FALSE and pMgr is NULL, the default docking manager for the application is used. This is the typical usage.

Example

Typically this function is called somewhere in your frame's OnCreate handler.
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
 ...
 m_dockingFeature.EnableDocking(this);
 };