TerraExplorer can notify the client when a message object is about to be triggered. The client can then either handle the message itself or let TerraExplorer handle it.
The value returned in SourceObjectID determines how the TEMessageID is interpreted.
HRESULT OnTerraExplorerMessage(
[in] BSTR TEMessageID,
[in] BSTR SourceObjectID,
[in, out] VARIANTARG *pbHandled)
Parameters:
TEMessageID – This value is interpreted based on the returning value of SourceObjectID below.
SourceObjectID – The value depends on the message type and initiator. The following are possible values for each message:
Sent by an ITerraExplorerObject5
derived object:
The ID of the object that owns the message object that is about to
be triggered. In this case, TEMessageID contains the ID of
the message object that is about to be triggered.
Text message sent by
IContainer2::SetMessageBarText() or by TerraExplorer:
”MessageBarText”. In this case, TEMessageID contains the
message text.
Sent by non-ITerraExplorerObject5
derived object (e.g., IContainer2::SetURL()):
"ContainerMessage". In this case, TEMessageID contains the
ID of a temporary message object, that can only be accessed during
the scope of the event.
Sent during FLY file load:
”LoadFlyContainer”. In this case, TEMessageID contains a
string combined from the container number, as defined in the
ITerraExplorerMessage5::Client, followed
by colon (“:”), followed by the URL to display. For example,
“1:http://www.skylinesoft.com”, means open the link in the lower
left container.
pbHandled – Setting this to TRUE informs TerraExplorer that the client handled the message itself and does not wish TerraExplorer to display the message. When the client sets this to FALSE, TerraExplorer handles the message normally.
Remarks:
See: “Handling TerraExplorer events”.