Messenger Plus! Live - Scripting Documentation

The PlusWnd::GetElementPos function returns the X position, Y position, width or height of the specified element. To get the position of a control instead, call the GetWindowRect API function.

Syntax

[number] GetElementPos(
    [string] ElementId,
    [number] PosInfo
);

Parameters

ElementId
[string] Unique identifier of the element.
PosInfo

[enum] Requested property of the element, represented by a number taken from the following enumeration:

POSINFO_X (1)
POSINFO_Y (2)
POSINFO_WIDTH (3)
POSINFO_HEIGHT (4)

Position on the X axis
Position on the Y axis
Width of the element
Height of the element

Return Value

A number containing the property requested in PosInfo. Values are all expressed in pixels and are client coordinates relative to the upper-left corner of the window.

This function typically fails for the following reason:

Remarks

This function is particularly useful when adding a PlaceHolderElement element in your window to create things like child windows. It helps find the appropriate position and size to use as elements are best declared, like controls, with dialog units instead of pixel units.

Function Information

Object PlusWnd
Availability Messenger Plus! Live 4.60

See Also

PlusWnd Object.