1.1 Compiling and Linking
1.2 Supported Platforms
2.1 'Filename' and 'Embed' Properties
2.2 Adding Features to Custom Controls
Windows 95/98/NT/2000
The HOOPS/ActiveX headers and source code are located in the /dev_tools/hoops_activex/source directory. This directory includes the Microsoft DevStudio Project files for rebuilding with Visual C++.
NOTE: For this release, the MSDEV project files integrate the HOOPS/ActiveX base classes with custom logic that forms the HOOPS 3D Stream Control (see below). Upcoming releases will separate pure HOOPS/ActiveX base classes from 3D Stream Control logic. For specific details on integrated customizations, contact support@techsoft3d.com.
The navigable diagram below illustrates the relationship of the ActiveX, HOOPS/ActiveX Integration Classes and the Custom Control Classes created in a sample custom control called 'MyControl' .
Therefore, custom HOOPS/ActiveX classes that define your own UI, etc... currently need to be created via a manual series of steps: (1) run AppWizard, replace all occurrences of COleControl and COleControlModule with CHoopsControl and CHoopsControlModule, (2) add 'Filename' and 'Embed' properties to your custom control class, and (3) add special code to your custom control's constructor, OnCreate, and destructor methods, and include several other custom functions and HOOPS/MVO objects.
A point release of HOOPS/3dAF v5.0 will include template-based AppWizard support for easily creating your own custom HOOPS/ActiveX control. (All necessary derived classes and code would be correctly pregenerated, and you could simply proceed with customizing the control's functionality per your requirements.)
For now, we recommend that the sample HOOPS 3D Stream Control be used as
a starting point for preliminary testing and prototyping. If you are preparing
to create your own custom HOOPS/ActiveX-based control and have not yet received
the HOOPS/ActiveX Template tools, please contact Tech Soft 3D support.
The 'filename' property drives the control by calling the method 'OnFilenameChanged' , which modifies the filename asssociated with the control. 'OnFilenameChanged' is called anytime a webpage references the control and passes in a 'filename'. (See formula1.htm located in /hoops/dev_tools/hoops_activex). In other cases, the 'OnFilenameChanged' method is called when the user pulls up the control 'Properties' from an OLE container application and loads a file.
'Embed' is another property used by custom controls. In the case of
OLE container applications, checking 'Embed' within the 'Property' page before
loading in the file ensures data persistence. Specifically, if you save
a Word document that includes the control and a file was loaded into the control,
then the file will be stored inside the Word document if 'Embed' is selected
(the state of the file is then 'serialized'). When the document is reopened,
the .hsf or .hmf file contents will be loaded back into the HOOPS/3dGS
scene-graph.
At the very least, the 'Filename' propertly would be one of the properties of your custom HOOPS/ActiveX control. 'Embed' would be necessary if you wanted to support persistence within OLE Container applications such as the MS Office programs.
A good starting point for evaluation and prototyping is to begin customizing the HOOPS 3D Stream Control. All the HOOPS/ActiveX-specific support logic and HSF streaming support is encapsulated in the base classes and the HOOPS 3D Stream Control classes. Therefore, customized code would primarily consist of working with vanilla MFC menu programming and CWnd methods to customize the right-click popup menu. Menu options can implement HOOPS/MVO and HOOPS/3dGS tools to create powerful, custom operators.
The source code for the HOOPS 3D Stream Control is available with the HOOPS/3dAF release. To access, just open the MSDev Workspace hview.dsw located in /hoops/dev_tools/hoops_activex. This workspace includes the base HOOPS/ActiveX control classes, as well as custom 'control-specific' logic that defines the HOOPS 3D Stream Control.
After downloading or manually building the 3D Stream Control, it will be registered on your system. At this point the control is accessible from within the 'Insert->Object' list within MS Office applications (or any OLE-container application, such as Visio, etc...), and will be instantiated whenever web pages that reference the control are loaded into Microsoft Internet Explorer (MSIE).
To experiment with the 'filename' property, insert the HOOPS 3D Stream Control into MS Word by selecting the menu option 'Insert > Object' and selecting 'HOOPS 3D Stream Control'. DeSelect and then Select the object via a single click. This will then let you access the menu option 'Edit > HOOPS 3D Stream Control Object > Properties' (alternatively, you can right-click on the control's border). Choose a file with the .hsf extension and that file will be streamed in. The file can be local or specified via a remote URL such as :