GetObjectByHandle Function | |
Return the object associated with a given window handle.
Namespace:
VOGUIClasses
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax FUNCTION GetObjectByHandle(
hwnd AS PTR
) AS Object
public static Object GetObjectByHandle(
void* hwnd
)
Request Example
View SourceParameters
- hwnd
- Type: Void*
The window handle.
Return Value
Type:
Object
The Window or Control object associated with the given window handle.
Remarks Examples
This example gets the object associated with the control that currently has focus:
1FUNCTION GetFocusedObject() AS OBJECT
2LOCAL oCtrl AS OBJECT
3oCtrl := GetObjectByHandle(GetFocus())
4IF IsInstanceOf(oCtrl, #Control)
5RETURN oCtrl
6ELSE
7RETURN NULL_OBJECT
8ENDIF
See Also