COM Wrapper Objects

A COM wrapper object is defined as one that wraps a nondrawable IDL object, and an ActiveX control as one that wraps a drawable IDL object. Typically, only ActiveX controls handle (user) events, but COM wrapper objects can also fire events so that the client can receive IDL output and notifications.

To use a COM wrapper object, the client instantiates one or more instances of the wrapper objects and then calls its methods and properties. An ActiveX control must be created in a host window before its methods and properties can be called.

ActiveX controls are typically hosted on GUI forms. These forms are generally built in a GUI-based development environment such as Visual Basic or Visual Studio .NET. The user creates a form by dragging and dropping controls onto the form. ActiveX controls usually interrogate the host window to determine what user mode they are in: design or runtime. While in design mode, the ActiveX control usually displays a static image whereas in runtime mode, the ActiveX control is executing and dynamically drawing to the screen.

The Export Bridge ActiveX wrapper controls also check for the user mode. In design mode, a static image with the IDL Export Bridge logo is displayed. In runtime mode, the ActiveX control internally calls the CreateObject method, the underlying IDL object is created, and IDL begins rendering to the ActiveX window. When the application is stopped and transitioned back to design mode, the ActiveX control internally calls the DestroyObject method, and the static image is once again displayed. See Stock COM Wrapper Methods for information on these methods.

Note
Not all ActiveX host windows provide the user mode. If the host window does not provide the user mode, the Export Bridge ActiveX wrapper controls assume that they are in runtime mode, and they immediately begin to render to the screen as soon as they are instantiated.