ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Windows Event functions
  • Constants defining the messages
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SendMessage (Function)
In french: SendMessage
Sends a Windows message to a control or to a window. This message is sent directly: as long as the message has not been processed, current processing is stopped (blocking function).. PostMessage is used to send a message without locking the application.
Remark: This function is a call to the Windows API SendMessage. It is used to perform low-level tasks on controls and windows. To find out the meaning of each message (and parameters), you must refer to the Windows API (WIN32).
Caution: Inappropriate use of this function can lead to serious problems in your application and/or GUI malfunctions.
Example
// Copier le contenu d'un champ de saisie dans le presse-papiers
SendMessage(Handle(SAI_SAISIE1), WM_COPY, 0, 0)
// Déclencher l'ouverture d'un menu contextuel sur un bouton
SendMessage(Handle(BTN_BOUTON1), WM_CONTEXTMENU, Handle(BTN_BOUTON1), -1)
Syntax
<Result> = SendMessage(<hWnd> , <Windows message> , <wParam> , <lParam>)
<Result>: Integer
The meaning of this parameter depends on the message sent.
<hWnd>: Integer
Handle of the control or window to which the message must be sent. This control or this window can be objects that do not belong to a WINDEV application. The handle of a control or window can be calculated by Handle (for the WINDEV objects) or by SysWinHandle.
<Windows message>: Integer or character string
Number or name of the Windows message to send. If a character string is used, the RegisterWindowsMessage function is automatically called to obtain the corresponding message number..
If this parameter corresponds to a character string, this string is case-sensitive.
<wParam>: Integer
Parameter whose use depends on the type of message sent.
<lParam>: Integer
Parameter whose use depends on the type of message sent.
Remarks

Constants defining the messages

The constants that define the possible messages are defined in the "WINCONST.WL" file available in the WINDEV directory (Personal\External subdirectory). To use this file in your applications, use the following code:
EXTERN "WINCONST.wl" // Définit la constante WM_MOUSEMOVE
SendMessage(Handle(SAI_SAISIE1), WM_MOUSEMOVE, 0, 0)
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help