1.1 Compiling and Linking
1.2 Supported Platforms
2.1 Control Properties and Methods
2.2 Adding Features to Custom Controls
Windows Vista/7/8
The headers and source code for the HOOPS ATL Stream Control are located in the /demo/atl/Hoops3dStreamCtrl/source directory. This directory includes the Microsoft DevStudio Project files for rebuilding with Visual C++.
One of the most important properties is called 'filename'.
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'. 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. Here is a HTML excerpt that embeddes the ATL control into a webpage and loads a default file:
<OBJECT name = "atltest" classid ="clsid:AD5F3C4B-BD73-11D5-838B-0050042DF1E4" width=600 height=500><PARAM name="filename" value="snowmobile.hsf"></OBJECT> '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.
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).
'Filename' Property
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 :