PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Constants defining the messages
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
Sends a Windows message to a control or to a window. This message is sent directly: the current process is stopped as long as the message is not processed (locking function). PostMessage is used to send a message without locking the application.
Note: This function performs a call to the Windows API named SendMessage. It is used to perform low-level tasks on the controls and windows. To find out the meaning of each message (and parameters), you must refer to the Windows API (WIN32).
Caution: The inappropriate use of this function can lead to very serious problems in your application and/or to malfunctions in the graphic interface.
Example
// Copy the content of an edit control into the clipboard
SendMessage(Handle(EDT_EDIT1), WM_COPY, 0, 0)
// Trigger the opening of a popup menu on a button
SendMessage(Handle(BTN_BUTTON1), WM_CONTEXTMENU, Handle(BTN_BUTTON1), -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, RegisterWindowsMessage is automatically called to get 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 different possible messages are defined in the "WINCONST.WL" file available in the directory of (Personal\External sub-directory). To use this file in your applications, use the following code:
EXTERN "WINCONST.wl"   // Defines the WM_MOUSEMOVE constant
SendMessage(Handle(EDT_EDIT1), WM_MOUSEMOVE, 0, 0)
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