This method is called when the user right-clicks the navigation window. With the ContextMenu parameter, you can define a pop-up menu which is displayed when the method is called.
When a command in the menu is selected, an OnCommand event is triggered providing the command identifier (See: OnCommand).
The XML string should be in the following format:
<ContextMenu>
<MenuItem Name = “Enter description of command” Command=”Command identifier string />
</ContextMenu>
Use <MenuItem Name = '---' /> to add a separator between groups of commands.
To create sub menus you can nest MenuItem nodes.
HRESULT OnPopupMenu(
[in] int MapX,
[in] int MapY,
[in] double TerrainX,
[in] double TerrainY,
[out] BSTR* bstrContextMenu)
Parameters:
MapX – The clicked on X-coordinate, in map pixels.
MapY – The clicked on Y-coordinate, in map pixels.
TerrainX – The terrain X -coordinate which corresponds to MapX.
TerrainY – The terrain Y -coordinate which corresponds to MapY.
bstrContextMenu – An XML string, see method description.