Partager via


CPane::DockPane

Docks the floating pane to a base pane.

virtual BOOL DockPane(
    CBasePane* pDockBar,
    LPCRECT lpRect,
    AFX_DOCK_METHOD dockMethod
);

Parameters

  • [in] [out] pDockBar
    Specifies the base pane to dock this pane to.

  • [in] lpRect
    Specifies the rectangle on the base pane where this pane is to be docked.

  • [in] dockMethod
    Specifies the docking method to use. Available options are as follows:

    Option

    Description

    DM_UNKNOWN

    The framework uses this option when the docking method is unknown. The pane does not store its most recent floating position. You can also use this option to programmatically dock a pane when you do not have to store the recent floating position.

    DM_MOUSE

    Used internally.

    DM_DBL_CLICK

    This option is used when the gripper is double-clicked. The pane is repositioned at its most recent docking position. If the pane is undocked by double-clicking, the pane is repositioned at its most recent floating position.

    DM_SHOW

    This option can be used to programmatically dock the pane. The pane stores its most recent floating position.

    DM_RECT

    The pane is docked in the region that is specified by lpRect.

    DM_STANDARD

    When you use this option, the framework draws the pane as an outline frame while it is being moved.

Return Value

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

Remarks

This method docks the pane to the base pane that is specified by the pDockBar parameter. You must first enable docking by calling CBasePane::EnableDocking.

Requirements

Header: afxPane.h

See Also

Reference

CPane Class

Hierarchy Chart