%U_WINMETRICS

Return window information

WSupported on Windows

 

 

 

return = %U_WINMETRICS(metric[, arg, ...])

or

xcall U_WINMETRICS(metric[, arg, ...])

return

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

metric

The information to return: (n)

D_CHARHEIGHT

Return height of characters.

D_CHARWIDTH

Return width of characters.

D_CHECKBOX_X

Return width of a check box or radio button.

D_CLIENT_RECT

Return coordinates for client area of a window.

D_COLTOX

Return width for a specified number of columns, or return the coordinate for the right side of a specified column.

D_EDITEXTRA_X

Return extra width required for an edit control.

D_HSCROLL_Y

Return height of a horizontal scroll bar.

D_MAPPOINTS

Convert points from the coordinate system of one window to the coordinate system for another window.

D_ROWHEIGHT

Return the overall height of a row.

D_ROWLEADING

Return the space between rows.

D_ROWTOY

Return height for the specified number of rows, or return the coordinate for the bottom of a specified row.

D_SCALE

Return display scaling factor for Windows.

D_SCREEN_X

Return screen width.

D_SCREEN_Y

Return screen height.

D_TABHEIGHT

Return the height of a tab.

D_TABWIDTH

Return the width of a tab.

D_TABXOFFSET

Return the horizontal offset for a tab set.

D_TABYOFFSET

Return the vertical offset for a tab set.

D_VISIBLE_RECT

Return coordinates for client area minus any area occupied by standard buttons.

D_VSCROLL_X

Return width of a vertical scroll bar.

D_WINDOW_RECT

Return coordinates for screen rectangle for a window.

D_XBORDER

Return width of a vertical side of a thin border.

D_XFRAME

Return width of a vertical side of a thick window frame.

D_XORIGIN

Return offset of first visible column from the left side of the client area.

D_XTOCOL

Return number for the column that contains pixels with a given x-axis coordinate.

D_YBORDER

Return thickness (height) of a horizontal side of a thin border.

D_YCAPTION

Return height of a caption bar.

D_YFRAME

Return thickness (height) of a horizontal side of a thick window frame.

D_YORIGIN

Return offset of first visible row from the top of the client area.

D_YTOROW

Return number for the row that contains pixels with a given y-axis coordinate.

arg

(optional) One to three arguments as required for the metric.

%U_WINMETRICS returns window information. See the information on individual subfunctions (below) for details.

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

W_INFO and %W_INFO routines for information on retrieving other types of window information

You can combine %U_WINMETRICS subfunctions to perform additional calculations. For example, the following code displays the size of the screen in characters. It does this by dividing the pixel size of the screen by the size of a character. (Note that this calculation doesn’t account for toolbars or scrollbars.)

xcall U_MESSAGE(“width “ + %string(%U_WINMETRICS(D_SCREEN_X)/
&     %U_WINMETRICS(D_CHARWIDTH, my_window))) ;Screen width in characters
xcall U_MESSAGE(“height “ + %string(%U_WINMETRICS(D_SCREEN_Y)/
&    %U_WINMETRICS(D_CHARHEIGHT, my_window)));Screen height in characters

For a more complete example, see Get_Window_Size, available from Synergy CodeExchange in the Synergex Resource Center. This example calculates the available area in a window (with some exceptions) when that window is fully expanded.

D_CHARHEIGHT

return = %U_WINMETRICS(D_CHARHEIGHT, window_id)

return

On Windows, the height in pixels of the sizing character for the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window.

WID_CONTAINER

The container window for the Synergy application.

The D_CHARHEIGHT subfunction of %U_WINMETRICS returns the height in pixels of the sizing character for the window specified by window_id. For more information on sizing characters, see Using fonts on Windows.

The following example returns in char_height (i4) the pixel height of the sizing character associated with wndid.

char_height = %U_WINMETRICS(D_CHARHEIGHT, wndid)

The next example returns the pixel height of the sizing character associated with the application window.

char_height = %U_WINMETRICS(D_CHARHEIGHT, WID_APP)

See also the %U_WINMETRICS Examples for an example that uses D_CHARHEIGHT as part of a calculation that uses multiple %U_WINMETRICS subfunctions.

D_CHARWIDTH

return = %U_WINMETRICS(D_CHARWIDTH, window_id)

return

On Windows, the width in pixels of the sizing character for the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

The D_CHARWIDTH subfunction of %U_WINMETRICS returns the width in pixels of the sizing character for the window specified by window_id. For more information on sizing characters, see Using fonts on Windows.

The following example returns in char_width (i4) the pixel width of the sizing character associated with wndid.

char_width = %U_WINMETRICS(D_CHARWIDTH, wndid)

The next example returns the pixel width of the sizing character associated with the application window.

char_width = %U_WINMETRICS(D_CHARWIDTH, WID_APP)

D_CHECKBOX_X

return = %U_WINMETRICS(D_CHECKBOX_X)

return

On Windows, the width in pixels of a check box or radio button. (^VAL)

The D_CHECKBOX_X subfunction of %U_WINMETRICS returns the width of a check box or radio button in pixels.

The following example returns in pixel_width (i4) the width of a check box in pixels.

pixel_width = %U_WINMETRICS(D_DCHECKBOX_X)

D_CLIENT_RECT

return = %U_WINMETRICS(D_CLIENT_RECT, h_wnd, rect)

or

xcall U_WINMETRICS(D_CLIENT_RECT, h_wnd, rect)

return

On Windows, true if successful, or false if not. (^VAL)

h_wnd

The handle for the window whose client area coordinates you want to retrieve. This doesn’t need to be a Synergy window. For example, this could be the handle for an ActiveX control, a window created by a DLL, or a window created by a different process. (n)

rect

The returned rectangle coordinates for the client area of the window. Rect is returned as a group of four i4 values, which are coordinates for the left, top, right, and bottom points (respectively) of the client area. (n)

The D_CLIENT_RECT subfunction of %U_WINMETRICS returns coordinates for the client area of the h_wnd window. (The client area is the inside area of a window minus the frame, captions, information line, and footer.) These coordinates are returned in the rect argument, which is a group of i4 values for the left, top, right, and bottom points of the client area. The left and top coordinates are always zero.

D_CLIENT_RECT and D_VISIBLE_RECT will always be equal for the application window (WID_APP), and they will always be equal for the container window (ID_CONTAINTER).

For the application and container windows, however, D_CLIENT_RECT may not be equal if, for example, a toolbar is placed. This area would be excluded from D_CLIENT_RECT for the application window.

For any other Synergy window, D_CLIENT_RECT and D_VISIBLE_RECT will be equal if the window does not include buttons.

The following example gets the client rectangle for the application window in rect.

success = %U_WINMETRICS(D_CLIENT_RECT, %W_INFO(WIF_HWND, WID_APP), rect)

D_COLTOX

return = %U_WINMETRICS(D_COLTOX, window_id, col_num[, D_SIZE|D_POSITION])

return

Varies depending on syntax. See Discussion below. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

col_num

If D_SIZE is passed, col_num specifies the number of columns whose width you want to measure. If D_POSITION is passed, col_num specifies a column number. (n)

D_SIZE

(optional) Return the pixel width of the number of columns specified in col_num. (default) (n)

D_POSITION

(optional) Return the x-axis pixel coordinate for the right side of the column specified by col_num. (n)

The D_COLTOX subfunction of %U_WINMETRICS returns either a width or an x-axis pixel coordinate.

This example returns in pixel_width (i4) the number of pixels that equates to six columns for wndid.

pixel_width = %U_WINMETRICS(D_COLTOX, wndid, 6, D_SIZE)

This example returns in pixel_width the right-most pixel of column 25 in the application window.

pixel_width = %U_WINMETRICS(D_COLTOX, WID_APP, 25, D_POSITION)

D_EDITEXTRA_X

return = %U_WINMETRICS(D_EDITEXTRA_X)

return

On Windows, the extra pixel width required for an edit control. (^VAL)

The D_EDITEXTRA_X subfunction of %U_WINMETRICS returns the extra pixel width required for an edit control to be placed over a specific set of characters. This is in addition to the number of characters times the character width.

The following example returns in pixel_width (i4) the number of extra pixels required for an edit control.

pixel_width = %U_WINMETRICS(D_EDITEXTRA_X)

D_HSCROLL_Y

return = %U_WINMETRICS(D_HSCROLL_Y)

return

On Windows, the height of a horizontal scroll bar in pixels. (^VAL)

The D_HSCROLL_Y subfunction of %U_WINMETRICS returns the height of a horizontal scroll bar in pixels.

The following example returns in pixel_height (i4) the height of a horizontal scroll bar in pixels.

pixel_height = %U_WINMETRICS(D_HSCROLL_Y)

D_MAPPOINTS

return = %U_WINMETRICS(D_MAPPOINTS, h_from, h_to, x_y_pair)

or

xcall U_WINMETRICS(D_MAPPOINTS, h_from, h_to, x_y_pair)

return

On Windows, a 32-bit value that contains the addends used to convert coordinates. The low-order 16 bits contain the x-axis addend, and the high-order 16 bits contain the y-axis addend. Each value can be a negative number. (See the Discussion below for information on extracting these values.) (^VAL)

h_from

A handle for the window whose coordinate system you want x_y_pair converted from. (n)

h_to

A handle for the window whose coordinate system you want x_y_pair converted to. (n)

x_y_pair

A set (or sets) of coordinates (x, y) for a point (or points) in the h_from window. Each 8 bytes of this argument is interpreted as a pair of i4 values that represent x- and y- axis coordinates, so the value you pass must have a size that’s a multiple of 8 bytes (8 bytes for a single point, 16 bytes for two points, and so forth). The converted coordinates are returned in this argument, so it must be writable. (n)

The D_MAPPOINTS subfunction of %U_WINMETRICS converts the x_y_pair set (or sets) of coordinates from the coordinate system of the h_from window to the coordinate system of the h_to window. In other words, it converts coordinates that are relative to the upper-left corner of the h_from window to coordinates that are relative to the upper-left corner of the h_to window. (Note that these windows can be in different processes.) This could be useful, for example, if you have an ActiveX control that has no border and acts as a background or pointer within a larger window. When a user clicks on the control, your event routine may need to convert the coordinates of the click location to coordinates in the same location in the parent window.

The converted coordinates are returned in the x_y_pair argument in the same order they were passed.

The addends used to calculate the new set(s) of coordinates are returned in return, which is a 32-bit value. The low-order 16 bits contain the x-axis addend, and the high-order 16 bits contain the y-axis addend. For example, if h_from is a window positioned at 100, 200 and h_to is a window positioned at 500, 50, return will contain the x-axis addend (decimal 400, hex190) in the low-order word and the y-axis addend (decimal -150, hex FF6A in 16-bit twos complement) in the high-order word. In this case, return will be returned as FF6A0190.

To extract the x- and y-axis addends from return, use the following:

cx = rval .band. ^x(FFFF)
cy = (rval .band. ^x(FFFF0000)) / ^x(1000)

where cx (i2 or i4) is the addend used to calculate the x-axis coordinates, cy (i2 or i4) is the addend used to calculate the y-axis coordinates, and rval (i4) is the returned value (return). (Rval can be a group of cx, i2 and cy, i2 values on little endian architectures.)

The following example first gets the visible rectangle for wndid, and then converts these points to their corresponding values in the application window.

if (%U_WINMETRICS(D_VISIBLE_RECT, wndid, rect)) then
  pts = %U_WINMETRICS(D_MAPPOINTS, %W_INFO(WIF_HWND, wndid),
&       %W_INFO(WIF_HWND, WID_APP), rect)

D_ROWHEIGHT

return = %U_WINMETRICS(D_ROWHEIGHT, window_id)

return

On Windows, the overall height in pixels of a row in the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

The D_ROWHEIGHT subfunction of %U_WINMETRICS returns the overall height (character height plus leading) in pixels of a row in the window specified by window_id.

The following example returns in row_height (i4) the pixel height of a row in wndid.

row_height = %U_WINMETRICS(D_ROWHEIGHT, wndid)

D_ROWLEADING

return = %U_WINMETRICS(D_ROWLEADING, window_id)

return

On Windows, the space between rows in pixels for the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

The D_ROWLEADING subfunction of %U_WINMETRICS returns the leading (the space between rows) in pixels for the window specified by window_id.

The following example returns in row_leading (i4) the number of pixels between rows for wndid.

row_leading = %U_WINMETRICS(D_ROWLEADING, wndid)

D_ROWTOY

return = %U_WINMETRICS(D_ROWTOY, window_id, row_num[, D_SIZE|D_POSITION])

return

Varies depending on syntax. See Discussion below. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

row_num

If D_SIZE is passed (or neither D_SIZE nor D_POSITION is passed), row_num specifies the number of rows whose height you want to measure. If D_POSITION is passed, row_num specifies a row number. (n)

D_SIZE

(optional) Return the pixel height of the number of rows specified in row_num. (default) (n)

D_POSITION

(optional) Return y-axis (vertical) pixel coordinate for the bottom of the row specified by row_num. (n)

The D_ROWTOY subfunction of %U_WINMETRICS returns either a height or a y-axis pixel coordinate.

This example returns in pixel_height (i4) the number of pixels that equates to six rows for wndid.

pixel_height = %U_WINMETRICS(D_ROWTOY, wndid, 6, D_SIZE)

The next example returns in pixel_height the bottom pixel of row 17 in the application window.

pixel_height = %U_WINMETRICS(D_ROWTOY, WID_APP, 17, D_POSITION)

D_SCALE

return = %U_WINMETRICS(D_SCALE)

return

On Windows, the display scaling factor. (^VAL)

The D_SCALE subfunction of %U_WINMETRICS returns the Windows display scaling factor (percentage) that is in effect on a Windows machine. The display scaling factor is set by the following Windows setting for the monitor that Windows uses as the primary monitor:

Display > Scale and layout > Change the size of text, apps, and other items

For example, if 100 is returned for D_SCALE, the Windows display scaling factor is set to 100%. You can use this information to help make sizing decisions when converting pixels to characters, when sizing window borders, etc.

See Monitor scaling and resolution on Windows for more information on Windows scaling.

The following example returns in disp_scale the Windows display scaling factor in effect for the machine.

disp_scale = %U_WINMETRICS(D_SCALE)

D_SCREEN_X

return = %U_WINMETRICS(D_SCREEN_X)

return

On Windows, the width of the screen in pixels. (^VAL)

The D_SCREEN_X subfunction of %U_WINMETRICS returns the width of the screen in pixels.

The following example returns in pixel_width (i4) the width of the screen (the monitor’s display area) in pixels.

pixel_width = %U_WINMETRICS(D_SCREEN_X)

See the %U_WINMETRICS Examples for an example that uses D_SCREEN_X as part of a calculation that uses multiple %U_WINMETRICS subfunctions.

D_SCREEN_Y

return = %U_WINMETRICS(D_SCREEN_Y)

return

On Windows, the height of the screen in pixels. (^VAL)

The D_SCREEN_Y subfunction of %U_WINMETRICS returns the height of the screen in pixels.

The following example returns in pixel_height (i4) the height of the screen (the monitor’s display area) in pixels.

pixel_height = %U_WINMETRICS(D_SCREEN_Y)

See the %U_WINMETRICS Examples for an example that uses D_SCREEN_Y as part of a calculation that uses multiple %U_WINMETRICS subfunctions.

D_TABHEIGHT

height = %U_WINMETRICS(D_TABHEIGHT, tabset_id, index)

height

On Windows, the height in pixels of a tab. (^VAL)

tabset_id

The ID of a tab set container window (the ID returned by the DTS_CREATE subfunction to %TS_TABSET). (n)

index

The index of the tab whose height you want returned. (n)

The D_TABHEIGHT subfunction of %U_WINMETRICS returns the height in pixels of the tab specified by the tabset_id and index arguments. Height is the y-axis measurement of the tab (so height will vary depending on whether the tab is part of a horizontal or vertical tab set).

If index is less than 1 or greater than the number of tabs in the specified tab set (tabset_id), Toolkit generates an error.

The following example returns the number of pixels that make up the height of the tab specified by tabset_id and tab_index.

tab_height = %U_WINMETRICS(D_TABHEIGHT, tabset_id, tab_index)

D_TABWIDTH

width = %U_WINMETRICS(D_TABWIDTH, tabset_id, index)

width

On Windows, the width in pixels of a tab. (^VAL)

tabset_id

The ID of a tab set container window (the ID returned by the DTS_CREATE subfunction to %TS_TABSET). (n)

index

The index of the tab whose width you want returned. (n)

The D_TABWIDTH subfunction of %U_WINMETRICS returns the width in pixels of the tab specified by the tabset_id and index arguments. Width is the x-axis measurement of the tab (so width will vary depending on whether the tab is part of a horizontal or vertical tab set).

If index is less than 1 or greater than the number of tabs in the specified tab set (tabset_id), Toolkit generates an error.

The following example returns the number of pixels that make up the width of the tab specified by tabset_id and tab_index.

tab_width = %U_WINMETRICS(D_TABWIDTH, tabset_id, tab_index)

D_TABXOFFSET

x_offset = %U_WINMETRICS(D_TABXOFFSET, tabset_id)

x_offset

On Windows, a tab set’s horizontal offset in pixels. (^VAL)

tabset_id

The ID of a tab set container window (the ID returned by the DTS_CREATE subfunction to %TS_TABSET). (n)

The D_TABXOFFSET subfunction of %U_WINMETRICS returns the distance in pixels from the left side of the client area of the tab set container window to the left side of the windows on the tabs. This distance includes the edge around the tab area and, if tabs are on the left, the width (x-axis measurement) of tabs.

The following example returns in x_offset (i4) the horizontal offset for the tab set specified by tabset_id.

x_offset = %U_WINMETRICS(D_TABXOFFSET, tabset_id)

D_TABYOFFSET

y_offset = %U_WINMETRICS(D_TABYOFFSET, tabset_id)

y_offset

On Windows, a tab set’s vertical offset in pixels. (^VAL)

tabset_id

The ID of a tab set container window (the ID returned by the DTS_CREATE subfunction to %TS_TABSET). (n)

The D_TABYOFFSET subfunction of %U_WINMETRICS returns the distance in pixels from the top of the client area of the tab set container window to the top of the windows on the tabs. This distance includes the edge around the tab area and, if tabs are on the top, the height (y-axis measurement) of tabs.

The following example returns in y_offset (i4) the vertical offset for the tab set specified by tabset_id.

y_offset = %U_WINMETRICS(D_TABYOFFSET, tabset_id)

D_VISIBLE_RECT

return = %U_WINMETRICS(D_VISIBLE_RECT, window_id, rect)

or

xcall U_WINMETRICS(D_VISIBLE_RECT, window_id, rect)

return

On Windows, true if successful, or false if not. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

rect

The returned rectangle coordinates for the points of the client area of the window, minus any area occupied by standard buttons. Rect is returned as a group of four i4 values, which are coordinates for the left, top, right, and bottom points (respectively) of the client area. (n)

The D_VISIBLE_RECT subfunction of %U_WINMETRICS returns coordinates for the client area of a window, minus any area occupied by standard buttons. (The client area is the inside area of a window minus the frame, captions, information line, and footer.) These coordinates are returned in the rect argument, which is a group of i4 values for the left, top, right, and bottom points of the client area.

See the D_CLIENT_RECT Discussion for information on when D_CLIENT_RECT and D_VISIBLE_RECT must agree or differ.

The following example gets the visible rectangle for wndid in rect.

success = %U_WINMETRICS(D_VISIBLE_RECT, wndid, rect)

D_VSCROLL_X

return = %U_WINMETRICS(D_VSCROLL_X)

return

On Windows, the width of a vertical scroll bar in pixels. (^VAL)

The D_VSCROLL_X subfunction of %U_WINMETRICS returns the width of a vertical scroll bar in pixels.

The following example returns in pixel_width (i4) the width of a vertical scroll bar in pixels.

pixel_width = %U_WINMETRICS(D_VSCROLL_X)

D_WINDOW_RECT

return = %U_WINMETRICS(D_WINDOW_RECT, h_wnd, rect[, rel_pos])

or

xcall U_WINMETRICS(D_WINDOW_RECT, h_wnd, rect[, rel_pos])

return

On Windows, true if successful, or false if not. (^VAL)

h_wnd

The handle for the window whose screen rectangle you want to retrieve. This doesn’t need to be a Synergy window. For example, this could be the handle for an ActiveX control, a window created by a DLL, or a window created by a different process. (n)

rect

The returned screen coordinates for the window. Rect is returned as a group of four i4 values, which contain the coordinates for the left, top, right, and bottom points (respectively) of the window. (n)

rel_pos

(optional) Determines whether the rect coordinates are relative to the screen or to the client area of the parent window. (n)

TRUE = Coordinates are relative to the upper-left corner of the screen.

FALSE = Coordinates are relative to the upper-left corner of the client area of the parent window. (default)

The D_WINDOW_RECT subfunction of %U_WINMETRICS returns coordinates for the outside edges of the screen rectangle for the h_wnd window. This includes frames, borders, captions, and so forth. If rel_pos is passed and true, these coordinates are relative to the upper-left corner of the screen. If rel_pos is not passed or is false, these coordinates are relative to the upper-left corner of the client area of the parent window.

The following example returns the screen rectangle for wndid in rect. The returned coordinates will be relative to the screen.

success = %U_WINMETRICS(D_WINDOW_RECT, %w_info(WIF_HWND, wndid), rect, TRUE)

D_XBORDER

return = %U_WINMETRICS(D_XBORDER)

return

On Windows, the width in pixels of a vertical thin border. (^VAL)

The D_XBORDER subfunction of %U_WINMETRICS returns the width in pixels of a vertical thin border.

The following example returns in pixel_width (i4) the width of the vertical side of a thin border.

pixel_width = %U_WINMETRICS(D_XBORDER)

D_XFRAME

return = %U_WINMETRICS(D_XFRAME)

return

On Windows, the width in pixels of a vertical side of a thick window frame. (^VAL)

The D_XFRAME subfunction of %U_WINMETRICS returns the width, in pixels, of a vertical side of a thick window frame.

The following example returns in pixel_width (i4) the width of the vertical side of a thick window frame.

pixel_width = %U_WINMETRICS(D_XFRAME)

D_XORIGIN

return = %U_WINMETRICS(D_XORIGIN, window_id)

return

On Windows, the offset in pixels of the first visible column from the left side of the client area for the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

The D_XORIGIN subfunction of %U_WINMETRICS returns the offset in pixels of the first visible column from the left side of the client area of the window specified by window_id.

The following example returns in offset (i4) the number of pixels between the first visible column and the left side of the client area for wndid.

offset = %U_WINMETRICS(D_XORIGIN, wndid)

D_XTOCOL

return = %U_WINMETRICS(D_XTOCOL, window_id, x_value)

return

On Windows, the number of the column that contains a given x-axis (horizontal) coordinate for a pixel. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

x_value

The x-axis (horizontal) coordinate for a pixel. This number must be based on the display area origin (where the 0, 0 pixel is at the top left of the display area). (n)

The D_XTOCOL subfunction of %U_WINMETRICS returns the number of the column that contains the pixel whose x-axis coordinate is x_value in the window specified by window_id. This subfunction assumes x_value is based on the display area origin, a coordinate system in which the 0, 0 pixel is at the top left of the display area.

When using proportional fonts in conjunction with D_XTOCOL, the returned column value may not be correct. This value is based on the sizing character for the window, not any actual text.

This example returns in column_num (i4) the number of the column with the specified pixel.

column_num = %U_WINMETRICS(D_XTOCOL, wndid, xpos)

D_YBORDER

return = %U_WINMETRICS(D_YBORDER)

return

On Windows, the height (thickness) in pixels of a horizontal thin border. (^VAL)

The D_YBORDER subfunction of %U_WINMETRICS returns the height (thickness) in pixels of a horizontal thin border.

The following example returns in pixel_height (i4) the height of the horizontal side of a thin border.

pixel_height = %U_WINMETRICS(D_YBORDER)

D_YCAPTION

return = %U_WINMETRICS(D_YCAPTION)

return

On Windows, the height in pixels of a caption bar. This includes the height of the upper frame. (^VAL)

The D_YCAPTION subfunction of %U_WINMETRICS returns the height in pixels of a caption bar. This height includes the height of the upper frame.

The following example returns in pixel_height (i4) the height of the caption bar.

pixel_height = %U_WINMETRICS(D_YCAPTION)

D_YFRAME

return = %U_WINMETRICS(D_YFRAME)

return

On Windows, the thickness (height) in pixels of a horizontal side of a thick window frame. (^VAL)

The D_YFRAME subfunction of %U_WINMETRICS returns the thickness (height) in pixels of a horizontal side of a thick window frame.

The following example returns in pixel_height (i4) the height of the horizontal side of a thick window frame.

pixel_height = %U_WINMETRICS(D_YFRAME)

D_YORIGIN

return = %U_WINMETRICS(D_YORIGIN, window_id)

return

On Windows, the offset in pixels of the first visible row from the top of the client area for the specified window. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

The D_YORIGIN subfunction of %U_WINMETRICS returns the offset in pixels of the first visible row from the top of the client area of the window specified by window_id.

The following example returns in offset (i4) the number of pixels between the first visible row and the top of the client area for wndid.

offset = %U_WINMETRICS(D_YORIGIN, wndid)

D_YTOROW

return = %U_WINMETRICS(D_YTOROW, window_id, y_value)

return

On Windows, the number of the row that contains a given y-axis (vertical) coordinate for a pixel. (^VAL)

window_id

The window ID or one of the following: (n)

WID_APP

The application window (excluding border and caption).

WID_CONTAINER

The container window for the Synergy application (including the border and caption).

y_value

The y-axis (vertical) coordinate for a pixel. This number must be based on the display area origin (where the 0,0 pixel is at the top left of the display area). (n)

The D_YTOROW of %U_WINMETRICS subfunction returns the number of the row that contains the pixel whose y-axis coordinate is y_value in the window specified by window_id. This subfunction assumes y_value is based on the display area origin, a coordinate system in which the 0, 0 pixel is at the top left of the display area.

The following example returns in row_num (i4) the row number that contains the specified pixel for wndid.

row_num = %U_WINMETRICS(D_YTOROW, wndid, ypos)