BOOL CBCGPStaticLayout::AddAnchor | ( | UINT | nID, |
XMoveType | typeMove, | ||
XSizeType | typeSize, | ||
const CPoint & | percMove = CPoint(100, 100) , |
||
const CPoint & | percSize = CPoint(100, 100) |
||
) |
Adds anchor for a control to layout manager.
typeMove can be one of the following enumerated values:
typeSize can be one of the following enumerated values
percMove - defines (in percents) how far a child control is moved in typeMove direction when size of host has been changed. percMove.X and percMove. Y values can be negative. If typeMove is set to e_sizeTypeHorz, percMove. Y is ignored. If typeMove is set to e_sizeTypeVert, percMove.X is ignored. If typeMove is set to e_sizeTypeNone, percMove is ignored.
For example, percMove.X is set to 50%. If size of host is changed by 20 pixels, the child is moved horizontally by 10 pixels from its current position.
percSize - defines (in percents) how child control is resized, when size of host has been changed. Here the library uses the same logic as for percMove. For example, percSize.X is set to 50%. If the size of host is changed by 20 pixels, the child is resized by 10 pixels.
nID | Child control ID. |
typeMove | Defines move direction. |
typeSize | Defines resize method. |
percMove | Defines (in percents) how far a child control is moved when a host is resized. |
percSize | Defines (in percents) how child control is resized. |