M
Mike M.
PPT2002, Widows 2000.
I wrote some code based upon some previous posts that does what I want it to
but I am not sure why it works. This is much better than it not working and
I am not sure why. I thought I would post the relevant snippet of code to
see if anyone can splain it to me. If I don't know why it works then I can
expect a support call on a Saturday at 4:00 AM. <g>
I open a presentation and then find the handle to it. Periodically I send a
new presentation to the computer and my program opens the new one, finds the
handle and then closes the old one. What I am unclear about is the magic
"screenClass" used in the FindWindow function call. Since I have two slide
shows open can I be assured I will find the second one on the subsequent
FindWindow call? It seems to do that. I am thinking the Windows must be
pushed on to the top of "stack".
pptNewPresentation = pptApplication->Presentations->Open(
presFile.AllocSysString(),
Office::msoTrue, Office::msoFalse, Office::msoFalse );
pptNewPresentation->SlideShowSettings->ShowType =
PowerPoint:pShowTypeSpeaker;
pptNewPresentation->SlideShowSettings->Run();
// this seems to find it.
pptHwnd = ::FindWindow("screenClass", NULL);
I wrote some code based upon some previous posts that does what I want it to
but I am not sure why it works. This is much better than it not working and
I am not sure why. I thought I would post the relevant snippet of code to
see if anyone can splain it to me. If I don't know why it works then I can
expect a support call on a Saturday at 4:00 AM. <g>
I open a presentation and then find the handle to it. Periodically I send a
new presentation to the computer and my program opens the new one, finds the
handle and then closes the old one. What I am unclear about is the magic
"screenClass" used in the FindWindow function call. Since I have two slide
shows open can I be assured I will find the second one on the subsequent
FindWindow call? It seems to do that. I am thinking the Windows must be
pushed on to the top of "stack".
pptNewPresentation = pptApplication->Presentations->Open(
presFile.AllocSysString(),
Office::msoTrue, Office::msoFalse, Office::msoFalse );
pptNewPresentation->SlideShowSettings->ShowType =
PowerPoint:pShowTypeSpeaker;
pptNewPresentation->SlideShowSettings->Run();
// this seems to find it.
pptHwnd = ::FindWindow("screenClass", NULL);