Click here to Skip to main content
15,917,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Typedef problems Pin
Michael Dunn18-Jan-02 16:43
sitebuilderMichael Dunn18-Jan-02 16:43 
GeneralRe: Typedef problems Pin
Nish Nishant18-Jan-02 16:54
sitebuilderNish Nishant18-Jan-02 16:54 
QuestionHow do I write my own stream? Pin
Xavier John18-Jan-02 16:10
Xavier John18-Jan-02 16:10 
AnswerRe: How do I write my own stream? Pin
Christian Graus18-Jan-02 22:51
protectorChristian Graus18-Jan-02 22:51 
GeneralWould anyone give some ideas about DirectShow,thanks !! Pin
MrGao18-Jan-02 16:03
MrGao18-Jan-02 16:03 
GeneralEmbedding Word Automation in My App..But.. _Document.SaveAs... Pin
SoonWon18-Jan-02 15:15
SoonWon18-Jan-02 15:15 
GeneralActiveX scripting engine link error Pin
Neville Franks18-Jan-02 14:10
Neville Franks18-Jan-02 14:10 
GeneralAutomation problems using MFC Pin
Jean Louis18-Jan-02 11:37
Jean Louis18-Jan-02 11:37 
Hi all.
In my application (MFC), I need to develop a network White Board that will be able to open and share MS Office documents.
I didn't find any other way to open and use a Powerpoint document but to use Automation. I do not want (and it is not possible anyway) to install Office on any of the machine the software will run on. I found Powerpoint Viewer and derived the classes from Msppt8vr.olb (using ClassWizard) to be included in my application. I would prefer to be able to read the Powerpoint file format instead of using Automation, but it looks like I have no other choice unless MS decide to release the specs of their format or (and this is what I hope) someone already managed to read and work with this format.

Anyhow. After spending days looking for infos over the web (most of the MS documentation is for VB) I found the right way to use Automation for Powerpoint Viewer (which is different than Powerpoint). But still, when I create the object through OLE Automation, the CreateDispatch function failed and I have no clue why. Here's my code:

[CODE]
void CCtipptDlg::OnButtonPpttest()
{
_Application app;
SlideShowView ctippt;
COleException e;
CLSID clsid;

// Create the object that we'll drive through OLE automation.
if (CLSIDFromProgID(OLESTR("PowerPointViewer.Application"), &clsid) != NOERROR)
{
AfxMessageBox("CLSIDFromProgID Error!");
return;
}

if (!app.CreateDispatch(clsid, &e))
{
AfxMessageBox("CreateDispatch Error!");
return;
}
}
[/CODE]

The first IF statement (CLSIDFromProgID) returns with no errors, meaning that it's finding the CLSID just fine in the MS registry (I also doubled checked manually in the registry and its fine).
But the second IF statement (CreateDispatch) fails and the thing doesn't create the object!

If anyone has a clue about why it doesn't work, let me know.
Thanks a lot in advance, guys...

GeneralRe: Automation problems using MFC Pin
moredip18-Jan-02 12:13
moredip18-Jan-02 12:13 
GeneralRe: Automation problems using MFC Pin
Jean Louis18-Jan-02 12:19
Jean Louis18-Jan-02 12:19 
GeneralRe: Automation problems using MFC Pin
Jean Louis18-Jan-02 12:48
Jean Louis18-Jan-02 12:48 
GeneralRe: Automation problems using MFC Pin
moredip18-Jan-02 12:55
moredip18-Jan-02 12:55 
GeneralRe: Automation problems using MFC Pin
Jean Louis18-Jan-02 13:07
Jean Louis18-Jan-02 13:07 
GeneralCArchive >> problems (why won't it take bools?) Pin
moredip18-Jan-02 11:26
moredip18-Jan-02 11:26 
GeneralRe: CArchive >> problems (why won't it take bools?) Pin
Michael Dunn18-Jan-02 13:09
sitebuilderMichael Dunn18-Jan-02 13:09 
GeneralRe: CArchive >> problems (why won't it take bools?) Pin
moredip18-Jan-02 13:16
moredip18-Jan-02 13:16 
GeneralRe: CArchive >> problems (why won't it take bools?) Pin
Michael Dunn18-Jan-02 13:34
sitebuilderMichael Dunn18-Jan-02 13:34 
GeneralRe: CArchive >> problems (why won't it take bools?) Pin
moredip21-Jan-02 5:41
moredip21-Jan-02 5:41 
GeneralXmlToArray Pin
18-Jan-02 9:57
suss18-Jan-02 9:57 
GeneralNetwork monitor Pin
Not Active18-Jan-02 9:51
mentorNot Active18-Jan-02 9:51 
GeneralRe: Network monitor Pin
Joaquín M López Muñoz18-Jan-02 10:17
Joaquín M López Muñoz18-Jan-02 10:17 
GeneralRe: Network monitor Pin
Not Active18-Jan-02 12:14
mentorNot Active18-Jan-02 12:14 
GeneralCWnd text editor Pin
alex.barylski18-Jan-02 8:24
alex.barylski18-Jan-02 8:24 
GeneralRe: CWnd text editor Pin
Joaquín M López Muñoz18-Jan-02 8:43
Joaquín M López Muñoz18-Jan-02 8:43 
GeneralRe: CWnd text editor Pin
loket18-Jan-02 11:55
loket18-Jan-02 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.