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

Don't forget that all measurements are set in DBUs (dialog box units).

Also see

setCtlPos, getCtlColor, getCtlVal

Example

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

Comments

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