Miscellaneous (ActiveX Control)
Normal Print Template commands cannot be used in the ActiveX Control because they can create a new window instead of printing.
However there are two 'hidden' commands that show the same sequence of Wizard pages (but always print at the end) and can be used from the ActiveX Control.
These commands are "AComPrintTemplateWizard" and "AComPrintTemplateWizardQuick".
There are now four types of display:
- Map View - shows a 2D view of the spatial data
- Table View - shows the overlay data in a table
- 3DView - shows a 3D view of the spatial data
- Tree View - shows a list of the different overlays. This is the same functionality found in the Maps Control Bar.
For cursor and numeric keypad keyboard scrolling to work, the ActiveX Control must have keyboard focus, i.e. all keyboard presses are directed to it rather than any other control.
It is good practice to call SetFocus after starting commands in a ActiveX Control.
In Visual Basic call the GotFocus event which will ensure that keyboard scrolling will work after the user clicks in the ActiveX Control.
Many instances of the ActiveX Control can be added to an application (eg to have a main view and a keymap).
Certain settings are shared between multiple ActiveX Controls:
- Named Object Libraries
- Default coordinate system
- Licence level
- Item defaults
- System variables
- Named Lists
- Named Seeds
- Application-specific local commands
- Named Tables and
- Database recordsets.
Similar to SIS applications, you can also run interactive viewing commands across multiple ActiveX Controls, i.e. start Box or Snap in one ActiveX Control but receive mouse snaps from another, e.g. a keymap.
However unlike SIS applications, the focus will not be returned to the window that started the command because the original window could be hidden or disabled or on another dialog, etc.
It is the responsibility of the application to reset the focus to the original ActiveX Control typically in the CommandAction event of the keymap control.
The ActiveX Control does not save any system settings in the Windows Registry; this is because more than one similar application could have been installed on the same computer.
Note: Similar applications are applications written using the same ActiveX Control but requiring different system settings.
It is therefore necessary to physically set all required system settings when the application is started.
An application may choose to present an SDI user interface instead of a being dialog-based.
In Visual Basic the ActiveX Control can be used in exactly the same way, but its owning form must be modified to be an SDI child window. See the Visual Basic documentation for further details.
In Visual C++ it is possible to create a ActiveX Control as a child of the CView derived class that the SDI application uses. If this approach is taken, however, the application cannot easily receive Events. In order to receive Events, the view class must be derived from CFormView and the dialog template used in the CFormView derived class should contain the ActiveX Control. This allows the application to address the ActiveX Control in the same way as a ActiveX Control on a dialog. See the Visual C++ documentation for further details.
You can create multiple views of the same ActiveX Control in separate MDI children or in splitter windows; this is because ActiveX Control-s have the SWD property. Setting the SWD property of one ActiveX Control to that of another ActiveX Control will make the second ActiveX Control contain the same overlays and view as the original.
The same restrictions as in SDI (above) apply.
The Developers Control Bar is a free-floating window which, in a SIS application is a child of the main window and is thus common to all of the child windows of the SIS Desktop application.
In the ActiveX Control however, there is no main window; only one or more instances of the control which share the Developers Control Bar.
This window will be created as a child of the most appropriate window at the time the ActiveX Control is loaded. It is up to the application to ensure that this parent window will always be available since hiding it will force its children to be hidden, i.e. the Developers Control Bar. In practice we recommend using the Developers Control Bar exclusively for Debugging.
The Map Window background colour can be set as required.
To set the Map Window background colour:
sis.SetProperty(SIS_OT_WINDOW,0,"_colour$","10 20 30")
where "10 20 30" are the RGB values respectively, in the range 0-255.
SIS Desktop dialogs do not have a Help button and instead use context-sensitive help.
The text for this help is built into the ActiveX Control so no other files are required. However, some dialogs do not have context-sensitive help. These dialogs recognise the F1 key and attempt to show the Cadcorp SIS Desktop on-line help at the help at the page for the command.