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

C / C++ / MFC

 
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 
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 
Thanks a lot. You pointed me in the right direction, though I didn't use (because I didn't find it) m_strDescription. Instead, I did this:

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

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

CoInitialize(NULL);

if (!app.CreateDispatch(clsid, &e))
{
e.GetErrorMessage(szCause, 255);
AfxMessageBox(szCause);
return;
}
}

Inside the second IF statement, I ran GetErrorMessage from my Exception handler (e) and it returned the message "CoInitialize not called"!!! There's no way in hell you will find anything in the MS documentation about CoInitialize in the Office Automation docs and I know what I'm talking about after spending Days on the MSDN documentation.

Anyhow, if anyone want to run an OLE automation client, here's what you'll need to do.

Thanks again Pete.

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 
GeneralRe: CWnd text editor Pin
alex.barylski18-Jan-02 21:02
alex.barylski18-Jan-02 21:02 
GeneralMemory Allocation Issues - MultiThreaded/MultiProcessor Pin
Peter Weyzen18-Jan-02 7:31
Peter Weyzen18-Jan-02 7:31 
GeneralRe: Memory Allocation Issues - MultiThreaded/MultiProcessor Pin
Joao Vaz18-Jan-02 7:58
Joao Vaz18-Jan-02 7:58 

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.