How to use
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
- Run the sample.
- Use the "Open File" icon to load an MXD to work with.
- Move the mouse pointer over the ToolbarControl. The first StatusBar pane will be updated with each Item's command message.
- Move the mouse pointer over the MapControl. The second StatusBar pane will be updated with the current mouse coordinates in map units.
Additional information
The HitTest method is used within the IToolbarControlEvents::OnMouseMove event to determine whether the mouse pointer is over an Item. If the mouse is over an IToolbarItem, the text of the first StatusBar pane is set to the Message of the IToolbarItem::Command.
The IMapControlEvents2::OnMouseMove event sets the text of the second StatusBar pane to the mouse coordinates in map units. The IMapControlEvent2::OnMapReplaced event is used to keep track of the MapControl's MapUnits.
StatusBar.h | Main header file |
StatusBar.cpp | Main implementation file |
MapControlEvents.h | Event header file |
MapControlEvents.cpp | Event implementation file |
ToolbarControlEvents.h | Event header file |
ToolbarControlEvents.cpp | Event implementation file |
Makefile.SolarisMotif | Solaris Project Makefile |
Makefile.LinuxMotif | Linux Project Makefile |
Download the files for all languages
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |