Retrieves the window ID of the parent window of the specified window.

long ctrx_get_window_parent_id(long window_id);


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

Return Values

If the function finds the specified window, it returns a unique numeric identifier for its parent window. If the specified window does not have a parent, it returns 0. If it fails, it returns 0 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 topmost window. The ctrx_get_window_parent_id function finds the parent window of the topmost window, and returns the numeric identifier of the parent window.

Copy code