@SENDMSG |
|
| Top Previous Next | |
Syntax:
@SENDMSG(<window>, <message number>, <wparam>, <lparam>)
Description:
This function allows you to use functionality not directly supported by VDS, by sending system messages to windows and dialog elements. Using this function requires understanding of the Windows API and languages such as C or Pascal, and you will need the Windows API documentation.
This function lets you use the Windows API SendMessage function to send a system message to another window. Messages are used to control windows (which include individual elements of a window) and to send information to them or retrieve information from them.
The <window> argument is the identifier of the window that is to be the target of the message. This can normally be obtained using @WINEXISTS or @WINATPOINT. If the target is a dialog element belonging to the current dialog, you can use the dialog element name prefixed by a tilde '~'.
The <message number> argument is the number which identifies the Windows message. This message specifies the functionality that is required.
The arguments <wparam> and <lparam> are required parameters to the message. Their exact contents are dependent on the message type, and will be determined from the Windows API documentation. If an argument is a string starting with the characters $, - or 0 to 9, it is interpreted as a word or integer value (in hexadecimal if starting with $.) If it is anything else, it is considered to be a string, and a pointer to the string is passed to the SendMessage API function. A pointer to a string or buffer can also be passed using the @ADDR function.
OK:
Unchanged.
Examples:
rem - make listbox LB display a horizontal scroll bar
%P = @sendmsg(~LB,1045,1000,0)
rem - return index of item in list box that starts with "Line 5"
%P = @sendmsg(@winexists(~LB), $018F, 0, Line 5 )
rem - use $01A2 for match on whole item
rem - set EDIT dialog element to use a password character of X
%P = @sendmsg(@winexists(~EDIT1), $00CC, @asc(X), 0 )
See also: