![]() | |||||||||||||||
IntroductionThis section describes how you can implement interaction between Brilliant Database and a third party program using the SendMessage WinAPI function that allows sending messages to other windows. Brilliant Database can receive and send two types of messages:
To use this function, you need to know the identifier of the window (HWND) that will process these messages. In Brilliant Database this HWDN is stored in the [$_hwnd] variable. Receiving messages from external programsWhen WM_USER or WM_COPYDATA messages are received, the "System->On SendMessage" script available from the Script Editor (Design->Database Scripts...) is called. In this script, values received in the message are stored into three variables:
For example, the following processor script will simply write sent data into the [InText] field of the current record:
The external program sending a message needs to know the HWND of a receiving window of Brilliant Database. To get this value, use the [_$hwnd] system variable. You can pass this value to another program, for example, by launching the program from Brilliant Database using the Open File/URL action with [$_hwnd] as a parameter. Note. The value stored in [$_hwnd] is not the identifier of the Brilliant Database main window, but is the identifier of a special window processing an external message. When the database is closed, this window is removed for security purposes. To learn how to send the WM_COPYDATA message, see MSDN web site. Sending messages to other programs (windows)To send a message, use the "Win SendMessage" action. Parameters:
| |||||||||||||||
|
Copyright (C) 2001-2010 Binary Brilliant Inc. All Rights Reserved. |