Resizes the specified window.
int ctrx_window_resize_by_id(long window_id, long width, long height, CTRX_LAST )
A unique window ID, returned by a function such as ctrx_get_window_id_by_order.
|width||Specifies the new width of the window.|
|height||Specifies the new height of the window.|
|CTRX_LAST||A marker that indicates the end of the argument list.|
- Do not use this function with a window that cannot be resized. If you attempt to resize a window that cannot be resized, you receive a timeout error.
- Known issue: If you specify a width and height that are too big (bigger than the display) or too small (smaller than the minimum possible size for the specified window), you may receive a timeout error, or the function may fail to resize the window but the replay logs will show a false report that the window was resized.
If the function succeeds, it returns E_OK. Otherwise, it returns E_GENERAL_ERROR or E_DISCONNECTED.
Parameterization is not available for this function.
In the following example, the ctrx_get_window_id_by_order function searches for the topmost window in the stack (in position 0). It returns the numeric identifier of the window. The ctrx_window_resize_by_id function resizes the window randomly ten times.
nx = rand() % 133 + 467;
ny = rand() % 640 + 160;
lr_log_message("i: %i, nx: %i, ny: %i", i, nx, ny);
ctrx_window_resize_by_id(windowID, nx, ny);