Using Callbacks to Retrieve Information from MapInfo®
You can tune your Integrated Mapping application to force MapInfo® automatically send information to your client program. For example, you can set up your program so that whenever a Map window changes, MapInfo® will call your client program and send it window ID (Integer) that was changed. This type of notification, where an event causes MapInfo® to call your client program, is known as Callbacks.
Callbacks allow MapInfo® to send information to your client program under the following circumstances:
The user interacts with a MapInfo® window while using a custom tool.
For example, if the user clicks and drags on a Map window to draw a line, MapInfo can call your client program to communicate the x- and y-coordinates chosen by the user.
The user chooses a menu command.
For example, suppose your application customizes MapInfo's shortcut menus (the menus that appear if the user right-clicks). When the user chooses a custom command from a shortcut menu, MapInfo can call your client program to notify your program of the menu event.
A Map window was changed.
If the user changes the contents of the Map window (e.g. by adding or removing map layers, or by panning the map), MapInfo® can send your client program the Integer window ID of the window that changed. (This is analogous to MapBasic's special handler procedure, WinChangedHandler).
The status bar text changes in MapInfo.
Information about using MapInfo Callbacks Manager with Borland® Delphi can be found here.
Information about using MapInfo Callbacks Manager with Microsoft® Visual Basic can be found here.