getCtlPos

Syntax

int getCtlPos(int index, int type)

Arguments

index
The index of the control that you want to get the position or size of.
type
0 = The horizontal coordinate of the user control's position (in DBUs)
1 = The vertical coordinate of the user control's position (in DBUs)
2 = The width of the user control (in DBUs)
3 = The height of the user control (in DBUs)

Return

The horizontal/vertical coordinates or the width/height of the control, depending on the value of the type parameter.

Description

Gets the co-ordinate position of the control or the width/height of the control, depending on the value of the type parameter. Don't forget that all measurements are set in DBUs (dialog box units). You can use the HDBUsToPixels function to convert this value to a pixel value if necessary.

Example

w = getCtlPos(10, 2); // returns the width of user control 10

See Also

getCtlColor, getCtlVal, HDBUsToPixels, setCtlPos

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.