The normal Print Template commands; Print Template [File-Print Template] and Quick Print Template [File-Print Template], 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 that always print at the end, that can be used from the ActiveX Control. These commands are "AComPrintTemplateWizard" and "AComPrintTemplateWizardQuick".
There are now four types of display:
In order for the 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 and, in Visual Basic, in 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 may be added to an application, e.g. to have a main view and a keymap. In this case certain settings will be shared between all of the ActiveX Control-s: Named Object Libraries; units; default coordinate system, licence level; datasets; item defaults; options; system variables; Named Lists; Named Seeds; application-specific local commands; Named Tables; and database recordsets.
It is also possible, in the same way as in SIS applications, to run interactive viewing commands across multiple ActiveX Control-s, i.e. start Box [Home-Zoom] or Snap [Home-Pan] in one ActiveX Control, but receive mouse snaps from another, e.g. a keymap. However, unlike the 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 therefore 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, because more than one application, written using the ActiveX Control but requiring different system settings, could be installed on the same computer. It is therefore necessary to 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 Controlcan 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.
It is possible to create multiple views of the same ActiveX Control in separate MDI children or in splitter windows, 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 application. In the ActiveX Control however, there is no main window, only one or more instances of the control which share, among other things like datasets and Named Object Libraries, 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 it is best to avoid use of the Developers Control Bar except 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 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 SIS on-line help at the help at the page for the command.
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).