How to access Application.ActiveWindow of an embedded OLE control inC++

R

RAHUL

Hi

I am using the DSOFramer sample (the C++ ActiveX document container)
for embedding and automating powerpoint in a plain C++ application.

What I want to achieve is to set "Application.ActiveWindow.ViewType =
ppViewSlide" for the embedded control when it shows up in the
container.
Since its an OLE container (Creates using CLSID_Microsoft PowerPoint
Presentation) I do not have the "Application" pointer to set the
above property from my C++ program.

How Do I set the above property using the OLE interfaces from C++ (can
I use IOleObject* or IOleDocumentView* etc. )
Can I retrieve the slides also?

Any help is appreciated.

Thanks & Regards
Rahul
 
M

Manvir Singh

Hi Rahul,

You can get the Application object from Presentation object, using
QueryInterface.

You can either query for _Application interface or for IDispatch; both
should allow you to set the ActiveView property.

HTH,
Manvir Singh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top