ctrx_window_move_by_id
Example |
Moves the specified window.
int ctrx_window_move_by_id(long window_id, long nx, long ny, int isRelative, CTRX_LAST )
window_id | A unique window ID, returned by a function such as ctrx_get_window_id_by_order. |
nx |
|
ny |
|
isRelative | Specifies whether the nX and nY parameters are interpreted as absolute coordinates or as a move vector. Possible values:
|
CTRX_LAST | A marker that indicates the end of the argument list. |
Return Values
If the function succeeds, it returns E_OK. Otherwise, it returns E_GENERAL_ERROR 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 window. The ctrx_window_move_by_id function moves the window randomly ten times up down left right 50 pixels.
int I;
long windowID, x, y;
windowID = ctrx_get_window_id_by_order(0);
for(i=0 ;i<10;i++)
{
x = rand() % 100 - 50;
y = rand() % 100 - 50;
ctrx_window_move_by_id(windowID, x, y, COORDINATE_SYSTEM_RELATIVE);
lr_think_time(3);
}