How to create an MFC Automation client for PowerPoint (169505)
The information in this article applies to:
- Microsoft PowerPoint 2002
- Microsoft PowerPoint 2000
- Microsoft PowerPoint 97 for Windows
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 5.0
- Microsoft Visual C++, 32-bit Editions 6.0
This article was previously published under Q169505 SUMMARY This article provides the minimum steps needed to create an
automation controller to manipulate the Microsoft PowerPoint object model using
the Microsoft Foundation Classes (MFC). This article is designed as a
tutorial. The tutorial makes the following assumptions:
- You are familiar with Visual C++.
- You are familiar with how MFC applications are
written.
- You have Microsoft PowerPoint installed on your development
machine.
- You have Microsoft Visual C++ installed on your development
machine.
The sample application you create uses menu options to control
the behavior of PowerPoint. The tutorial demonstrates How To
- Use the PowerPoint 97 object library (msppt8.olb), the
PowerPoint 2000 object library (msppt9.olb) or the PowerPoint 2002 object
library (msppt.olb) to create COleDispatchDriver wrapper classes.
- Connect to the application object.
- Create presentations.
- Create slides.
- Create shapes on a slide.
- Run a slide show.
NOTE: This article is designed to show you the basics of controlling
the PowerPoint object model with a Visual C++ MFC application. The code created
is not intended to be production quality. The coding techniques were selected
to simplify the process as much as possible. NOTE: As an alternative to using the Microsoft Foundation Classes, you
can use the #import feature of the Visual C++ compiler to convert the contents
of a type library into Visual C++ classes. For more information on
the #import directive, please refer to the online documentation. For a code
sample, please see the COMEXCEL sample.
Modification Type: | Minor | Last Reviewed: | 12/7/2004 |
---|
Keywords: | kbProgramming kbhowto kbmacro KB169505 |
---|
|