![]() |
![]() |
![]() |
Messaging TechniquesThe following information is not specific to StageRace but is given as a technical reference for programmers that want to use the StageRace Messaging protocol. Window MessagesWindow messages are used within Windows® to communicate between separate application windows. Window messages are identified by their unique message identifier. Message identifiers are numerical values, but are kept hidden (transparent) by string identifiers, such as "WM_USER". On start-up of StageRace, all appropriate message strings are registered with Windows®. Other applications can do the same, arranging all the applications to have the same correct and unique numerical identifiers to match the string identifiers. Message FormatThe Windows® API functions for inter-window messaging are defined like the one below:
(There are more API functions for messaging, this is just an example to illustrate the message format.) Ergo the message format is like this:
We suggest messages to be posted as global broadcast. In this case Destination handle = HWND_BROADCAST. This will cause your message to be sent to all top-level windows, but only the appropriate window will respond anyway due to the specific Message ID. Message Extensions (Atoms)Applications can register strings with Windows in exchange for an identifier of the ATOM type. These atom identifiers are used by the messages sent across windows to pass strings "by pointer". Strictly, someone is responsible to clean up atom strings after use. For the defined messages StageRace will take responsibility to clean up the atoms. Technical ReferencesThe inter-window communication is discussed in the library of the Microsoft® Developer Network (MSDN).
|
Converted from CHM to HTML with chm2web Standard 2.8 (unicode) |