CWindow.AnchorControlmethod
Anchors a window or control to its parent window.
Syntax
FUNCTION AnchorControl (BYVAL hwndCtl AS HWND, BYVAL nAnchorMode AS LONG) AS BOOLEAN
FUNCTION AnchorControl (BYVAL cID AS LONG, BYVAL nAnchorMode AS LONG) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
hwndCtl | Handle to the child window or control. | |
cID | Identifier of the child window or control. | |
nAnchorMode | One of the following constants. |
Description
Anchors a window or control to its parent window.
Examples
ENUM AFX_ANCHORPOINT AFX_ANCHOR_NONE = 0 AFX_ANCHOR_WIDTH AFX_ANCHOR_RIGHT AFX_ANCHOR_CENTER_HORZ AFX_ANCHOR_HEIGHT AFX_ANCHOR_HEIGHT_WIDTH AFX_ANCHOR_HEIGHT_RIGHT AFX_ANCHOR_BOTTOM AFX_ANCHOR_BOTTOM_WIDTH AFX_ANCHOR_BOTTOM_RIGHT AFX_ANCHOR_CENTER_HORZ_BOTTOM AFX_ANCHOR_CENTER_VERT AFX_ANCHOR_CENTER_VERT_RIGHT AFX_ANCHOR_CENTER END ENUM
pWindow.AnchorControl(IDCANCEL, AFX_ANCHOR_BOTTOM_RIGHT) pWindow.AnchorControl(IDC_GROUPBOX, AFX_ANCHOR_HEIGHT_RIGHT) pWindow.AnchorControl(IDC_COMBOBOX, AFX_ANCHOR_RIGHT)
Reference
- Include file
CWindow.inc - Defined in AfxNova/CWindow.inc:2192
- Documented in Windows/Windows GUI/CWindow Class.md
- Topic: CWindow Class