Share this page

# ctrx_get_window_parent_id

Example

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

`long ctrx_get_window_parent_id(long window_id);`

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

Parameterization is not available for this function.

## Example

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

    ctrx_get_window_parent_id(ctrx_get_window_id_by_order(0));

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: