1.0 Introduction
The HOOPS/ActiveX Integration classes encapsulate the work needed to
connect the HOOPS 3D Application Framework to the Microsoft ActiveX
Control classes. The integration classes are intended to serve as base
classes from which developers can derive their own custom, HOOPS-based
ActiveX controls such as the HOOPS
3D Stream Control.
The HOOPS/ActiveX integration classes configure
various components of the HOOPS 3D Application Framework appropriately
for the ActiveX environment and manage control-level issues such as:
- Data transfer between the Internet and the
HOOPS/3dGS scene graph
- Connection with HOOPS/Stream for stream-enabled HSF file generation
and file reading
- Asynchronous streaming of HSF files from remote or local URL's
- Data caching to avoid repetitive downloads
- Incremental drawing of HSF file data to the ActiveX window
- Data persistence in ActiveX container applications
- Vector printing via the Windows GDI native
interface
- Connection with the HOOPS/MVO class library for immediate Model
and View interactivity, such as camera orbit operations
- In-place activation and deactivation of a HOOPS view, including
WMF generation for inactive states
- Output to the Windows clipboard and metafile
formats
- Right-click menu interface
2.0 ActiveX Overview
ActiveX is a platform which allows developers to create content and applications
oriented toward the Internet or Intranets.
ActiveX Controls are one of the most common ActiveX technologies used
by developers to extend the availability of their technology. They
act as programmable objects that can be embedded into any application
that is an ActiveX Control Container. The ActiveX technology includes:
ActiveX Controls
ActiveX controls (formerly called OLE controls) are objects which may be
inserted into Web pages or any documents able to be read by ActiveX container
applications (such as the MS Office suite). Examples include buttons, stock
tickers, and chart controls.
ActiveX Documents
ActiveX documents can be displayed by Web browsers or document viewers.
Traditional embedded objects were limited to one page and were shown embedded
in the document. With ActiveX, the document can be displayed full frame in
the entire client area window.
ActiveX Server Framework
You can extend a Web server to provide customized Web pages using content
from a database or an application which runs on the server. The MFC ISAPI
classes provide an easy method to write custom server extensions and
filters.
Internet Data Download Services
Data can be downloaded over the Internet using common protocols: HTTP, FTP,
and gopher. The MFC WinInet classes make it easy to transfer data using HTTP,
FTP, and gopher protocols by abstracting the TCP/IP and WinSock protocols.
The MFC asynchronous moniker classes provide a way to download files without
blocking and to render large objects asynchronously.
Active Scripts
VBScript and other scripting languages connect controls and add interactive
functionality to Web pages. Scripting moves processing from the server to
the client. For example, form entries can be validated on the client and then
sent to the server.
HTML Extensions
HTML extensions, such as the object tag, have been added to support
controls and scripting.
3.0 MFC Base Classes for an
ActiveX Control
The main classes for an ActiveX Control, which are part of the Microsoft
Foundation Classes, are:
- COleControl
- COleControlModule
The diagram below illustrates the relationships between these classes:
COleControl
The COleControl class is the base class for developing OLE controls. Derived
from CWnd, this class inherits all the functionality of a Windows window object
plus additional functionality specific to OLE, such as event firing and the
ability to support methods and properties.
OLE controls can be inserted into OLE container applications. This
class communicates with the container by using a two-way system of event firing
and through exposed methods and 'properties'.
COleControlModule
The COleControlModule class is the base class from which an OLE control
module object is derived. This class provides member functions for initializing
and terminating the DLL. (An ActiveX control is simply a .dll)
4.0 HOOPS/ActiveX Integration
Classes
The integration of HOOPS/3dAF with ActiveX Control base classes consists
primarily of connections between HOOPS/MVO and ActiveX base classes.
The HOOPS/MVO toolkit encapsulates the HOOPS/3dGS scene graph and
houses the main dispatch between UI events and operations on 3D models.
Details on MVO can be found in the discussion of the HOOPS
Model/View/Operator paradigm.
The HOOPS/ActiveX integration classes encapsulate the connection
between MVO and ActiveX and implement both HOOPS- and ActiveX-specific
functionality. They are derived from the main
ActiveX Control classes and include the following two classes:
- CHoopsControl
- CHoopsCtrlMod
The diagram below illustrates their relationships to each other and the
main ActiveX Control classes.