GetSIPRect

Description

Gets the rectangular coordinates of the SIP, whether it is visible or not, on a Pocket PC device or emulator.

Syntax

int GetDeskRect (long left, long top, long right, long bottom)

Argument

Description

left

Leftmost value of the rectangular area occupied by the SIP

top

Topmost value of the rectangular area occupied by the SIP

right

Rightmost value of the rectangular area occupied by the SIP

bottom

Bottommost value of the rectangular area occupied by the SIP

Returns

Integer. Returns 1 for success and -1 for failure.

Usage

Typically it is useful to know the topmost coordinate of the SIP so you can adjust the positions and sizes of controls on the current window when the SIP is visible.

On the desktop, GetSIPRect parameters left, top, right, and bottom always have the values 0, 214, 240, and 290, which are the coordinates for a typical SIP window on a Pocket PC device.

Examples

Example 1

The following example displays the coordinates for the SIP in a multiline edit text box:

String strDisplay=""
int rc
long left = 0, top = 0, right = 0, bottom = 0

rc = GetSIPRect(left, top, right, bottom)
strDisplay +=("Desk RECT:~r~n~t Left = " +string(left)&
 +"~r~n~t Top=" + String(top) + "~r~n~t Right = " &
 + String(right)+ "~r~n~t Bottom = " + String(bottom))
mle_1.text = strDisplay

See also