%U_WININFO

Return Windows-specific information

WSupported on Windows

 

 

 

value = %U_WININFO(info[, arg, ...])

or

xcall U_WININFO(info[, arg, ...])

value

On Windows, a value that is specific to the info flag. On Unix, always returns false. On OpenVMS, always returns true. (^VAL)

info

The information to return: (n)

D_CURSORPOS

Return the current pixel coordinates for the mouse pointer.

D_HINSTANCE

Return the instance handle for the Synergy runtime.

D_VKTOASCII

Return the ASCII character that corresponds to a virtual key code.

arg

(optional) Up to two arguments if required for info.

%U_WININFO returns Windows-specific information. See the individual subfunctions for details.

If a value other than those listed above is passed for info, a fatal error will occur.

%U_WINMETRICS routine for Windows-specific metrics information

D_CURSORPOS

value = %U_WININFO(D_CURSORPOS, x_coordinate, y_coordinate)

or

xcall U_WININFO(D_CURSORPOS, x_coordinate, y_coordinate)

value

On Windows, true. (^VAL)

x_coordinate

The returned x-axis pixel coordinate for the mouse cursor. (n)

y_coordinate

The returned y-axis pixel coordinate for the mouse cursor. (n)

The D_CURSORPOS subfunction of %U_WININFO returns the x-axis and y-axis pixel coordinates for the current location of the mouse cursor. Note that these coordinates are relative to the screen, not a window.

The following example returns in xpos and ypos (both i4) the current pixel coordinates of the mouse cursor relative to the screen.

success = %u_wininfo(D_CURSORPOS, xpos, ypos)

D_HINSTANCE

value = %U_WININFO(D_HINSTANCE)

value

On Windows, the instance handle (D_ADDR) for the Synergy runtime (dbr). (^VAL)

The D_HINSTANCE subfunction of %U_WININFO returns the instance handle for the Synergy runtime (dbr). This could be passed, for example, to a DLL routine to create a window. (The instance handle is one of the required arguments to CreateWindow and CreateWindowEx.)

The following example returns in hinstance the instance handle of the Synergy runtime (.dbr).

hinstance = %u_wininfo(D_HINSTANCE)

D_VKTOASCII

value = %U_WININFO(D_VKTOASCII, vk_code[, key_state])

value

On Windows, the ASCII character that corresponds to vk_code if one exists; otherwise returns 0. (^VAL)

vk_code

The virtual key code (numeric value) of any alphanumeric character or any function key as defined in tools.def (D_VKINSERT, D_VK1, and so forth). (n)

key_state

(optional) The key state flags as defined in tools.def: D_KEY_SHIFT, D_KEY_CONTROL, D_KEY_ALT, or any combination of these combined using .BOR. or the vertical bar (|) operator. (n)

The D_VKTOASCII subfunction of %U_WININFO returns the ASCII character that corresponds to vk_code or vk_code plus key_state. If this doesn’t result in an ASCII value, D_VKTOASCII returns zero. Note that the numeric values of most printable characters correspond to the ASCII values of the characters. The exceptions are a-z, which use their upper-case values (65-90).

The following example returns in ascii (i4) the value that corresponds to the letter “a” (lower-case).

ascii = %U_WININFO(D_VKTOASCII, %decml('A'))

The following example returns the value that corresponds to the letter “D” (upper-case).

ascii = %U_WININFO(D_VKTOASCII, %decml('D'), D_KEY_SHIFT)

The next example returns the value that corresponds to the F6 key with the Alt and Ctrl keys.

ascii = %U_WININFO(D_VKTOASCII, D_VKF6, D_KEY_ALT .bor. D_KEY_CONTROL)