InstallShield 2016 » InstallScript Language Reference
The SendMessage function sends a message to one or more windows. SendMessage does not return control to the setup script until the message has been processed. The SendMessage function is a direct pass-through to the Windows API SendMessage. Consult the Windows programming documentation for detailed information.
Note • To send a message using the parameter nMsg or to handle return values, you must define constants in your script that are equivalent to the constants defined in Windows.h. You cannot use #include to include Windows.h in your script.
Syntax
SendMessage ( nHwnd, nMsg, nwParam, nlParam );
Parameters
Parameter |
Description |
nHwnd |
Specifies the handle that identifies the window to receive the message. |
nMsg |
Specifies the message to send to the window(s). |
nwParam |
Specifies additional message information. |
nlParam |
Specifies additional message information. |
Return Values
SendMessage returns the value it receives from calling the Windows API of the same name. The return value depends on the message received by the Windows API SendMessage. Consult Windows programming documentation for detailed information on messages returned by the Windows API SendMessage.
Additional Information
To pass string data in the fourth parameter of SendMessage, do the following:
1. | For projects converted from InstallShield Professional, include the required function declaration by doing one of the following: |
• | Remove the preprocessor constant ISINCLUDE_NO_WINAPI_H from the Preprocessor Defines box, which is available on the Compile/Link tab on the Settings dialog box. (To access this dialog box, click Settings on the Build menu.) |
• | Place the following code in your script: |
prototype USER.SendMessageA(HWND, NUMBER, NUMBER, BYREF STRING);
(For projects created with InstallShield, ISRTWindows.h is included by default in Ifx.h, which in turn is included by default in the script.)
2. | Call the function as in the following example: |
USER.SendMessageA( hWnd, LB_GETTEXT, nResult, sResult);
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |