Retrieves the size of the specified window.

int ctrx_get_window_size_by_id(long window_id, long * window_width, long * window_height);


A unique window ID, returned by a function such as ctrx_get_window_id_by_order.

window_widthOutput parameter containing window width.
window_heightOutput parameter containing window height.

Return Values

If the function finds the specified window, 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_get_window_size_by_id function uses the numeric identifier to search for the window, and retrieves its width and height. The lr_log_message function prints the width and height to the log.

Copy code
long w, h;

    ctrx_get_window_size_by_id(ctrx_get_window_id_by_order(0), &w, &h);
    lr_log_message("window size: %ld, %ld",w,h);