共用方式為


CPane::MoveByAlignment

Moves the pane and the virtual rectangle by the specified amount.

BOOL MoveByAlignment(
   DWORD dwAlignment,
   int nOffset
);

Parameters

  • [in] dwAlignment
    Specifies pane alignment.

  • [in] nOffset
    The amount, in pixels, by which to move the pane and the virtual rectangle.

Remarks

dwAlignment can be any of the following values:

Value

Description

CBRS_ALIGN_TOP

Enables the pane to be docked to the top of the client area of a frame window.

CBRS_ALIGN_BOTTOM

Enables the pane to be docked to the bottom of the client area of a frame window.

CBRS_ALIGN_LEFT

Enables the pane to be docked to the left side of the client area of a frame window.

CBRS_ALIGN_RIGHT

Enables the pane to be docked to the right side of the client area of a frame window.

CBRS_ALIGN_ANY

Enables the pane to be docked to any side of the client area of a frame window.

If dwAlignment contains the CBRS_ALIGN_LEFT or CBRS_ALIGN_RIGHT flag, the pane and virtual rectangle are moved horizontally; otherwise, if dwAlignment contains the CBRS_ALIGN_TOP or CBRS_ALIGN_BOTTOM flag, the pane and virtual rectangle are moved vertically.

Requirements

Header: afxpane.h

See Also

Reference

CPane Class

Hierarchy Chart