%U_WINCELLS
Convert pixels to fractional rows or columns
WSupported on Windows
|
|
|
|
cells = %U_WINCELLS(D_ROWS|D_COLS, window_id, pixels)
or
xcall U_WINCELLS(cells, D_ROWS|D_COLS, window_id, pixels)
Return value
cells
On Windows, the number of rows or columns. This may be fractional (implied decimal). (d)
On Unix, always returns false. On OpenVMS, always returns true. (n)
Arguments
D_ROWS
Interpret pixels as a vertical series of pixels. Cells will be returned as the number of rows needed to span these pixels. (n)
D_COLS
Interpret pixels as a horizontal series of pixels. Cells will be returned as the number of columns needed to span these pixels. (n)
window_id
The window ID or one of the following: (n)
The application window (excluding border and caption).
The container window for the Synergy application (including the border and caption).
pixels
The number of pixels to convert. (n)
Discussion
%U_WINCELLS returns the number of columns or rows needed to span a given number of pixels.
Cells can be a fractional number. If, for example, the number of columns needed to span 80 pixels is 2.5, cells will be returned as 2.5 (implied decimal).
Examples
The following example returns the number of rows it takes to span the number of pixels (specified with the pixels variable) for the specified window:
rows = %u_wincells(D_ROWS, wndid, pixels)
The next example returns the number of columns it takes to span the number of pixels (specified with the pixels variable) for the specified window:
cols = %u_wincells(D_COLS, wndid, pixels)