Documentation
Download compressed HTML Help
     

Control functions


Functions

RANOREXCORE_API HWND RxControlGetFocus (void)
 Retrieves the handle to the window that has the keyboard focus.
RANOREXCORE_API HWND RxControlSetFocus (HWND hWnd)
 The SetFocus function sets the keyboard focus to the specified window.
RANOREXCORE_API BOOL RxControlEnable (HWND hWnd)
 The function enables mouse and keyboard input to the specified window or control.
RANOREXCORE_API BOOL RxControlDisable (HWND hWnd)
 The function disables mouse and keyboard input to the specified window or control. The window does not receive input such as mouse clicks and key presses.
RANOREXCORE_API BOOL RxControlHide (HWND hWnd)
 The function hides the window and activates another window. The window does not receive input such as mouse clicks and key presses.
RANOREXCORE_API BOOL RxControlShow (HWND hWnd)
 The function Activates the window and displays it in its current size and position.
RANOREXCORE_API int RxControlGetText (HWND hWnd, char *controlText, int maxTextLength)
 The function copies the text that corresponds to a control into a buffer.
RANOREXCORE_API int RxControlGetTextLength (HWND hWnd)
 The function get the length, in characters, of the text associated with a control.
RANOREXCORE_API BOOL RxControlSetText (HWND hWnd, char *controlText)
 The function sets the text of a control.
RANOREXCORE_API BOOL RxControlGetPosition (HWND hWnd, int *left, int *top, int *right, int *bottom)
 The function retrieves the current position of the bounding rectangle of the specified window. The positions are given in screen coordinates that are relative to the upper-left corner of the screen.
RANOREXCORE_API BOOL RxControlSetPosition (HWND hWnd, int left, int top, int right, int bottom)
 The function sets the current position of the bounding rectangle of the specified window. The positions are given in screen coordinates that are relative to the upper-left corner of the screen.
RANOREXCORE_API char * RxControlGetClassName (HWND hWnd)
 The RxControlGetClassName function retrieves the name of the class to which the specified window belongs.
RANOREXCORE_API char * RxControlGetControlName (HWND hWnd)
 The RxControlGetControlName function retrieves the name of the control.
RANOREXCORE_API int RxControlGetControlId (HWND hWnd)
 The RxControlControlId function retrieves the identifier of the specified control.
RANOREXCORE_API int RxControlGetState (HWND hWnd)
 The function gets the current state of the specified control. The most used states are: CONTROL_UNAVAILABLE, CONTROL_SELECTED, CONTROL_FOCUSED, CONTROL_PRESSED CONTROL_CHECKED, CONTROL_INVISIBLE.
RANOREXCORE_API BOOL RxControlIsFocused (HWND hWnd)
 Call this function to determine whether a control has the input focus.
RANOREXCORE_API BOOL RxControlIsEnabled (HWND hWnd)
 Call this function to determine whether a control is enabled.
RANOREXCORE_API BOOL RxControlIsVisible (HWND hWnd)
 Call this function to determine whether a control is visible.
RANOREXCORE_API HWND RxControlFromPosition (int x, int y)
 The function retrieves a handle to the control at the specified position.
RANOREXCORE_API void RxControlSendKeys (HWND hWnd, char *keys, int keyPressDelay=KEYPRESS_DEFAULT_DELAY, int keyDownTime=KEYDOWN_DEFAULT_TIME)
 Sends a keystroke to the specified control.
RANOREXCORE_API BOOL RxControlCompareImage (HWND hWnd, int left, int top, int right, int bottom, int xOffset=0, int yOffset=0)
 The function compares the image of the control with another image on the screen. The positions are given in screen coordinates that are relative to the upper-left corner of the screen.
RANOREXCORE_API BOOL RxControlCompareImageFile (HWND hWnd, char *imageFileName, int xOffset=0, int yOffset=0)
 The function compares the image of the control with another image loaded from a file.
RANOREXCORE_API BOOL RxControlFindImage (HWND hWnd, int left, int top, int right, int bottom, int *foundLeft, int *foundTop, int clipLeft=0, int clipTop=0, int clipRight=-1, int clipBottom=-1)
 The function searches an image on the screen within the control rectangle. The positions are given in screen coordinates that are relative to the upper-left corner of the screen.
RANOREXCORE_API BOOL RxControlFindImageFile (HWND hWnd, char *imageFileName, int *foundLeft, int *foundTop, int clipLeft=0, int clipTop=0, int clipRight=-1, int clipBottom=-1)
 The function searches an image loaded from a file on the screen within the control rectangle.
RANOREXCORE_API HWND RxControlFindChildText (HWND hWnd, char *text, int textMatchMode=MATCH_EXACT)
 The function retrieves a handle of the child control whose text match the specified strings. This function searches a child of the control, performs a case-sensitive search. If no child control can be found with the specified text, the function return zero.
RANOREXCORE_API HWND RxControlFindChildClassName (HWND hWnd, char *className, int classInstance=1)
 The function retrieves a handle to the child control whose classname and classinstance match the specified strings. This function searches a child of the control, performs a case-sensitive search. If no child control can be found with the specified classname and instance number, the function return zero.
RANOREXCORE_API HWND RxControlFindChildControlName (HWND hWnd, char *controlName)
 The function retrieves a handle to the child control whose control name match the specified strings. This function performs a case-sensitive search. If no child can be found with the specified control name, the function return zero.
RANOREXCORE_API HWND RxControlFindChildControlId (HWND hWnd, int controlId)
 The function retrieves a handle to the child window with the specified control Id. If no child window can be found with the specified control Id, the function return zero.

Detailed Description

Control functions
Documentation based on Ranorex Version 1.5.0 - www.ranorex.com