PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the system "Handle" (HWND) of a WINDEV control or window. This allows you to call some API functions with this parameters (with API or CallDLL32, SendMessage or PostMessage).
This "Handle" is rarely used with the WLangage functions.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad Returns the UIView associated with the window. This identifier can be used when programming in Objective C.
note: the UIView is not initialized in the declaration code of global variables of the window but in the end of initialization code of the window. See Typing Objective C code for more details.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad Returns the UIView associated with the window. This identifier can be used when programming in Objective C.
note: the UIView is not initialized in the declaration code of global variables of the window but in the end of initialization code of the window. See Typing Objective C code for more details.
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad Returns the UIView associated with the window. This identifier can be used when programming in Objective C.
note: the UIView is not initialized in the declaration code of global variables of the window but in the end of initialization code of the window. See Typing Objective C code for more details.
Android The concept of handle does not exist in the Android applications. A native Java code can get a "context" if necessary with getCurrentActivity and getApplicationContext. See Specific features of applications for Android - Using a native Java code in an Android application for more details.
Example
// Copy the content of an edit control into the clipboard
SendMessage(Handle(EDT_EDIT1), WM_COPY, 0, 0)
WINDEVReports and QueriesUser code (UMC)
// Immediately refresh the drawing of CONTROL1
hwnd is int = Handle(CONTROL1)
CallDLL32("USER32", "UpdateWindow", hwnd)
Syntax

Retrieving the handle of a control or window Hide the details

<Result> = Handle([<Object Name>])
<Result>: Pointer
Requested handle.
<Object Name>: Optional character string (with or without quotes)
Name of the control or window. If this parameter is not specified, Handle is using the current window. If this parameter corresponds to a table column, the handle of its edit control will be returned (NULL if the column is not in edit).

Retrieving the handle of a specific element in a control Hide the details

<Result> = Handle([<Object Name>,] <Object Type>)
<Result>: Integer
Requested handle.
<Object Name>: Optional character string (with or without quotes)
Name of the control.
<Object Type>: Integer constant
Element of the combo box whose handle is requested.
HandleHScrollbarReturns the handle of the horizontal scrollbar of the control.
HandleVScrollbarReturns the handle of the vertical scrollbar of the control.
HandleComboBoxListReturns the handle of the drop-down list associated with a combo box (the control must be a Combo Box control).
HandleComboBoxEditReturns the handle of the edit control associated with a combo box (the control must be a Combo Box control).
Versions 17 and later
iPhone/iPad

Retrieving the handle of an iPhone/iPad window Hide the details

<Result> = Handle([<Object Name>,] <Object Type>)
<Result>: Integer
UIView associated with the window.
<Object Name>: Optional character string (with or without quotes)
Window Name. If this name corresponds to a control name, <Result> will correspond to NULL.
<Object Type>: Integer constant
Element whose handle is sought.
HandleUIViewControllerReturns the UIViewController associated with the specified window. If this constant is used, <Result> will correspond to a non-null value for the windows only (but not for the controls).
Versions 20 and later
HandleNativeControl
New in version 20
HandleNativeControl
HandleNativeControl
Returns the native iOS control associated with the specified control. If this constant is used, <Result> will correspond to a non-null value for the following controls only: Map control (MKMapView) and HTML control (UIWebView).
New in version 17
iPhone/iPad

Retrieving the handle of an iPhone/iPad window Hide the details

<Result> = Handle([<Object Name>,] <Object Type>)
<Result>: Integer
UIView associated with the window.
<Object Name>: Optional character string (with or without quotes)
Window Name. If this name corresponds to a control name, <Result> will correspond to NULL.
<Object Type>: Integer constant
Element whose handle is sought.
HandleUIViewControllerReturns the UIViewController associated with the specified window. If this constant is used, <Result> will correspond to a non-null value for the windows only (but not for the controls).
Versions 20 and later
HandleNativeControl
New in version 20
HandleNativeControl
HandleNativeControl
Returns the native iOS control associated with the specified control. If this constant is used, <Result> will correspond to a non-null value for the following controls only: Map control (MKMapView) and HTML control (UIWebView).
iPhone/iPad

Retrieving the handle of an iPhone/iPad window Hide the details

<Result> = Handle([<Object Name>,] <Object Type>)
<Result>: Integer
UIView associated with the window.
<Object Name>: Optional character string (with or without quotes)
Window Name. If this name corresponds to a control name, <Result> will correspond to NULL.
<Object Type>: Integer constant
Element whose handle is sought.
HandleUIViewControllerReturns the UIViewController associated with the specified window. If this constant is used, <Result> will correspond to a non-null value for the windows only (but not for the controls).
Versions 20 and later
HandleNativeControl
New in version 20
HandleNativeControl
HandleNativeControl
Returns the native iOS control associated with the specified control. If this constant is used, <Result> will correspond to a non-null value for the following controls only: Map control (MKMapView) and HTML control (UIWebView).
Related Examples:
The alarms Unit examples (WINDEV): The alarms
[ + ] Implementing an alarm to display an alert message in the title bar of the active window (regardless of the application).
The following topics are presented:
1/ The system functions (retrieving the handle of a window)
2/ Triggering a process according to a given frequency (timers)
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment