SAMPLE: FramerEx.exe Is an MDI ActiveX Document Container Sample Written in Visual C++
This article has been archived. It is offered "as is" and will no longer be updated.
FramerEx.exe is a modified version of the Microsoft Platform Software Development Kit (SDK) Framer sample for ActiveX document hosting. FramerEx.exe is a multiple-document interface (MDI) host application that demonstrates how an ActiveX document container can host multiple documents and perform commonly requested operations, such as in-place print preview, opening and saving to existing Office documents (.doc, .xls, and .ppt files), in-place activation of Microsoft Visual Basic ActiveX documents (.vbd files), and even the hosting of HTML files (if Internet Explorer 4.0 or later is installed).
The following file is available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online ServicesMicrosoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.The self-extracting FramerEx.exe setup file contains the following files:
The FramerEx SampleThe FramerEx sample is written in Visual C++ 6.0 using the Platform SDK. It provides a basic example of how an MDI application can work as an ActiveX document host without using Microsoft Foundation Classes (MFC). It is designed to be as simple as possible to demonstrate just those elements that are important to ActiveX documents, and provides no functionality of its own. It does, however, demonstrate some of the more advanced features of ActiveX documents that are not covered by the Framer sample that ships with the Platform SDK.
If you are using Visual C++ version 6.0, you can simply open the project file and compile the application to build and run the program.
The example works with all ActiveX document servers, including Word documents (.doc files), Excel workbooks (.xls files), PowerPoint presentations (.ppt files), and Visual Basic ActiveX document projects (.vbd files). If you have Internet Explorer 4.0 or later installed, you can even open Web pages (.html files) in-place because Internet Explorer uses an ActiveX document server (Mshtml.dll) to view Web pages inside frames.
You have a royalty-free right to use, modify, reproduce, and distribute this sample application, and/or any modified version, in any way you find useful, provided that you agree that Microsoft has no warranty, obligations or liability for the code or information provided herein.
THE FRAMEREX SAMPLE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
In-place Print PreviewAmong the features that are demonstrated by FramerEx is print preview. Developers should note that print previewing is NOT part of the ActiveX document specification, and there is no standard agreement on how preview should work for an ActiveX document container. Consequently, preview capabilities are not supported with all servers. It is up to your application to fail gracefully if previewing is not available.
However, beginning with Office 97, some Microsoft Office applications do support an interface called IInplacePrintPreview, which allows the ActiveX document server to preview an in-place object on behalf of the host. The interface was created (after the ActiveX document specification was made) for use by Microsoft Binder to support print previewing. This is NOT a formal addition to the ActiveX document specification, and not all ActiveX document servers support this interface. Nonetheless, it has been made public to allow developers to incorporate this feature when they work with specific Office applications.
FramerEx demonstrates how to use IInplacePrintPreview to start a preview session, and implements IPreviewCallback to monitor preview status. You can use this technique for previewing Word, Excel and Visio documents inside custom applications. PowerPoint does not support in-place print previewing, but you can automate PowerPoint to start an in-place slide show.
For more information on ActiveX documents, see the Framer sample that ships with the Platform SDK.
For more information on interfaces such as IOleDocument, IOleDocumentSite, and IOleCommandTarget, search for these interface names at the following MSDN Web site:
Article ID: 268470 - Last Review: 01/12/2015 16:52:49 - Revision: 6.0
Microsoft Excel 2000 Standard Edition, Microsoft PowerPoint 2000 Standard Edition, Microsoft Word 2000, Microsoft Excel 2002 Standard Edition, Microsoft PowerPoint 2002 Standard Edition, Microsoft Word 2002
- kbnosurvey kbarchive kbdownload kbactivedocs kbfile kbinfo kbsample KB268470