Maptitude GISDK Help |
Creates a new COM control window.
Added to Version 5.0.
string = CreateCOMControl(string name,string progid, array options)
Argument |
Contents |
name |
The desired name for the COM control window |
progid |
The program ID of the COM control |
Option |
Type |
Contents |
Activate Macro |
String |
The name of a macro that is called whenever the map is activated |
Close Macro |
String |
The name of a macro called when the user closes the map from the system menu |
Context Menu |
String |
The name of the menu resource to use to display a custom context menu when there is a right click on the window |
Done Macro |
String |
The name of a macro that is called after the window is closed |
Event Macro |
String |
The name of a macro called whenever the control fires an event |
Resize Macro |
String |
The name of a macro called whenever the window is resized by the user |
Aspect Ratio |
2 integers |
The aspect ratio of the window (height, width) |
Menu |
String |
The menu associated with the map window |
Position |
Array |
The screen location of the window in an array of 2 integers {x, y} |
Size |
2 integers |
The screen size of the window (x, y) |
Toolbar |
String |
The toolbar associated with the map window |
The name of the COM control window.
The event macro is called with 3 arguments: the COM interface to the control, the event name as a string, and an array containing the parameters passed by the event.
The resize macro is called with 3 arguments: the COM interface to the control, and the new width and height of the COM control window in pixels.
Window size and position are specified as percentages of the frame window.
If the menu, toolbar, activate macro, or close macro is not specified, CreateCOMControl() uses the default specified with SetDefaults(). If a layout-specific default was not specified with SetDefaults(), then CreateCOMControl() uses the generic default.
Some controls handle the right-click themselves and this will preempt the Context Menu option.
name = CreateCOMControl("My Control", "Shell.Explorer", {{"Event Macro", "Explorer Event Macro"}})
Error |
Meaning |
Error |
One of the options is invalid |
Function |
Summary |
Closes the window containing the COM control |
|
Creates a new instance of a COMObject |
|
Gets the COM objects in a COM collection |
|
Gets the name of the COM interface for an object from the type library |
|
Gets the COM interface of a COM control window |
|
Gets the currently active instance of a COMObject |
|
Sets the title of a COM control window. |
©2025 Caliper Corporation | www.caliper.com |