how to run Powerpoint slideshow inside a dialog

Hi All,
I am trying to display powerpoint slides in a dialog create by my
application.


if(m_pptapp.m_lpDispatch == NULL)
  {
	if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
	{
         AfxMessageBox("Could not create Powerpoint object.");
         return;
	}
  }

  m_pptapp.SetVisible((long)1);


Presentations presentations;
  SlideShowSettings slideshow;

  presentations = m_pptapp.GetPresentations();
  m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
(long)-1,(long)1 );

  slideshow = m_pptpresentation.GetSlideShowSettings();
  slideshow.SetShowType(1);
  slideshow.Run();


but it is not helpful for me

Could some flash some light on how to show powerpoint slides inside
dialog, Dialog should act as a container for powerpoint slides.

Thanks,
Ajay

0
4/6/2007 11:32:47 AM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
1446 Views

Similar Articles

[PageSpeed] 3

This might be a good start

http://support.microsoft.com/kb/q180616/
http://support.microsoft.com/kb/237554


AliR.

"Roland" <ajay.sonawane@gmail.com> wrote in message 
news:1175859167.531209.272360@w1g2000hsg.googlegroups.com...
> Hi All,
> I am trying to display powerpoint slides in a dialog create by my
> application.
>
>
> if(m_pptapp.m_lpDispatch == NULL)
>  {
> if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
> {
>         AfxMessageBox("Could not create Powerpoint object.");
>         return;
> }
>  }
>
>  m_pptapp.SetVisible((long)1);
>
>
> Presentations presentations;
>  SlideShowSettings slideshow;
>
>  presentations = m_pptapp.GetPresentations();
>  m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
> (long)-1,(long)1 );
>
>  slideshow = m_pptpresentation.GetSlideShowSettings();
>  slideshow.SetShowType(1);
>  slideshow.Run();
>
>
> but it is not helpful for me
>
> Could some flash some light on how to show powerpoint slides inside
> dialog, Dialog should act as a container for powerpoint slides.
>
> Thanks,
> Ajay
> 


0
AliR3470 (3236)
4/6/2007 3:50:58 PM
Ali,
I want to run the presenation or attach the window of presentation to
the dialog or some window create by my application. I don't want to
just "Run" the presentation.

-Ajay

On Apr 6, 8:50 pm, "AliR \(VC++ MVP\)" <A...@online.nospam> wrote:
> This might be a good start
>
> http://support.microsoft.com/kb/q180616/http://support.microsoft.com/kb/237554
>
> AliR.
>
> "Roland" <ajay.sonaw...@gmail.com> wrote in message
>
> news:1175859167.531209.272360@w1g2000hsg.googlegroups.com...
>
>
>
> > Hi All,
> > I am trying to display powerpoint slides in a dialog create by my
> > application.
>
> > if(m_pptapp.m_lpDispatch == NULL)
> >  {
> > if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
> > {
> >         AfxMessageBox("Could not create Powerpoint object.");
> >         return;
> > }
> >  }
>
> >  m_pptapp.SetVisible((long)1);
>
> > Presentations presentations;
> >  SlideShowSettings slideshow;
>
> >  presentations = m_pptapp.GetPresentations();
> >  m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
> > (long)-1,(long)1 );
>
> >  slideshow = m_pptpresentation.GetSlideShowSettings();
> >  slideshow.SetShowType(1);
> >  slideshow.Run();
>
> > but it is not helpful for me
>
> > Could some flash some light on how to show powerpoint slides inside
> > dialog, Dialog should act as a container for powerpoint slides.
>
> > Thanks,
> >Ajay- Hide quoted text -
>
> - Show quoted text -


0
4/9/2007 4:29:18 AM
If you wanted to just "Run" it, then I would have told you to use 
ShellExecute.

The articles that I pointed you to tells you how to embed the presentation 
into your window using Automation.  That means that it shows up in your 
application.

what do YOU mean by attach?
AliR.

"Roland" <ajay.sonawane@gmail.com> wrote in message 
news:1176092958.640664.225690@y66g2000hsf.googlegroups.com...
> Ali,
> I want to run the presenation or attach the window of presentation to
> the dialog or some window create by my application. I don't want to
> just "Run" the presentation.
>
> -Ajay
>
> On Apr 6, 8:50 pm, "AliR \(VC++ MVP\)" <A...@online.nospam> wrote:
>> This might be a good start
>>
>> http://support.microsoft.com/kb/q180616/http://support.microsoft.com/kb/237554
>>
>> AliR.
>>
>> "Roland" <ajay.sonaw...@gmail.com> wrote in message
>>
>> news:1175859167.531209.272360@w1g2000hsg.googlegroups.com...
>>
>>
>>
>> > Hi All,
>> > I am trying to display powerpoint slides in a dialog create by my
>> > application.
>>
>> > if(m_pptapp.m_lpDispatch == NULL)
>> >  {
>> > if(!m_pptapp.CreateDispatch("Powerpoint.Application"))
>> > {
>> >         AfxMessageBox("Could not create Powerpoint object.");
>> >         return;
>> > }
>> >  }
>>
>> >  m_pptapp.SetVisible((long)1);
>>
>> > Presentations presentations;
>> >  SlideShowSettings slideshow;
>>
>> >  presentations = m_pptapp.GetPresentations();
>> >  m_pptpresentation = presentations.Open("R:\\Internals.ppt",(long)0,
>> > (long)-1,(long)1 );
>>
>> >  slideshow = m_pptpresentation.GetSlideShowSettings();
>> >  slideshow.SetShowType(1);
>> >  slideshow.Run();
>>
>> > but it is not helpful for me
>>
>> > Could some flash some light on how to show powerpoint slides inside
>> > dialog, Dialog should act as a container for powerpoint slides.
>>
>> > Thanks,
>> >Ajay- Hide quoted text -
>>
>> - Show quoted text -
>
> 


0
AliR3470 (3236)
4/9/2007 2:26:07 PM
On Apr 9, 12:29 am, "Roland" <ajay.sonaw...@gmail.com> wrote:
> Ali,
> I want to run the presenation or attach the window of presentation to
> the dialog or some window create by my application. I don't want to
> just "Run" the presentation.
>


You will need to use Automation and use PP's object model to do this.
All this involves using COM on your side(client). Its relatively
simple to do this in .Net as you avoid COM altogether.

---
Ajay

0
ajaykalra (6842)
4/9/2007 2:57:39 PM
I know, but I want to follow this one
http://skp.mvps.org/vb/pptvbwnd.htm
where slideshow window is inside a frame control.
Can I do somewhat like this ?

Thanks,
Ajay

On Apr 9, 7:57 pm, "Ajay Kalra" <ajayka...@yahoo.com> wrote:
> On Apr 9, 12:29 am, "Roland" <ajay.sonaw...@gmail.com> wrote:
>
> > Ali,
> > I want to run the presenation or attach the window of presentation to
> > the dialog or some window create by my application. I don't want to
> > just "Run" the presentation.
>
> You will need to use Automation and use PP's object model to do this.
> All this involves using COM on your side(client). Its relatively
> simple to do this in .Net as you avoid COM altogether.
>
> ---Ajay


0
4/10/2007 10:39:28 AM
On Apr 10, 6:39 am, "Roland" <ajay.sonaw...@gmail.com> wrote:
> I know, but I want to follow this onehttp://skp.mvps.org/vb/pptvbwnd.htm
> where slideshow window is inside a frame control.
> Can I do somewhat like this ?
>

Yes, you should be able to do this as well. Sample is using the PP's
object model and you can do the same in MF/C++. As I had mentioned
earlier, its much easier to do this in VB or .Net.

---
Ajay

0
ajaykalra (6842)
4/10/2007 1:15:04 PM
Reply:

Similar Artilces:

how to send clipart to backgroung in powerpoint
how do you send clipart into the background so that the text can bee seen over it? Select clipart picture, right click, click Order, and Send Backward/ "Grevenalathis" wrote: > how do you send clipart into the background so that the text can bee seen > over it? Thank you very much, been awhile since i used power point so i forgot how to do this. "marysully" wrote: > Select clipart picture, right click, click Order, and Send Backward/ > > "Grevenalathis" wrote: > > > how do you send clipart into the background so ...

How to cancel or stop update dialog box when I start Microsoft Money 2006.
Hi all, How to cancel or stop update dialog box when I start Microsoft Money 2006. It always show me: "Please wait while Money checks for software updates. This might take several minutes." Thanks, Rowen ...

How to display an ICON on Dialog
I have an icon resource defined, how can I show it programmatically on my dialog? Rob Place a Picture control on your Dialog box, change it's type to ICON, and then set the image id to the icon you want to display. AliR. "Rob K" <rbk@no.spamm.net> wrote in message news:U9Aqf.3519$q45.3390@fe17.lga... > I have an icon resource defined, how can I show it programmatically on my > dialog? > > Rob > > > You could use a Picture Control (from the tools palette) and set it to Icon type then use LoadIcon() or set your resource directly in the Properti...

How to run a macro by opening a file?
Does anyone have any suggestions on how to run a macro when I open a file? For example, I would like to run a specific macro within file.xls, if current time is between 9 am and 10 am, otherwise, don't run this macro. Does anyone have any suggestions on how to do it? I am using XP with SP3 and Office 2003. Thanks in advance for any suggestions Eric hi something like this might work........ Private Sub Workbook_Open() If Time > "9:00 AM" And Time < "10:00 AM" Then call ASpecificMacro Else MsgBox "current time out of range. terminati...

Can't Run Window's Media Player
Hi--I just got Windows XP Pro intalled on my Dell Inspiron 1100 after it crashed. I assumed the media player would work for watching DVDs, but when I click the icon or right-click it and say 'play" nothing at all happens. When I insert the DVD it gives me the option of running it, but again nothing happens. It recognizes the name of the DVD but that's all. I tried downloading the decoder recommended on the Microsoft page (Roxio) for $15, but that hasn't done anything. Can anyone tell me in **very** simple language, as I have no computer knowledge, what to...

Auto FE Updater in Run Time
Hey Everyone, I have a problem and am hoping someone else has had it too.. In my applicaiton, I have implemented the Albert Kallal Super Easy Mail Merge and its been working beutifully now for about a year. Recently, I implemented the Auto FE Updater function. Since doing this, my super easy mail merge functions have stopped functioning properly. Now when my user clicks on the button to run the mail merge, the report thats generated retains the old values. It shows the values from the last time the code was run. So my user, clicked once, sent out the information and everythin...

running a macro within anohter macro in Excel
I have 2 macros written. I would like to press Alt G for example and have it run Alt F followed by additonal instructions. Both macros work fine independently, but I want to execute both with the button I have set up for one. Thanks!! One way: Public Sub Macro1() 'Alt-F MsgBox "Macro1" End Sub Public Sub Macro2() MsgBox "Macro2" End Sub Public Sub Macro3() 'Alt-G Macro1 Macro2 End Sub or, if you're never going to run Macro2 independently, just: Public Sub Macro2() '...

Specify budget to use at run time in FRx?
Let's say I have 2 budgets defined: FCAST-ORIGINAL and FCAST-REV1. Is there any way to set up an FRx report so that I can specify, at run time, which one of the budgets to utilize on the report? If I need the ability to print reports using either of the two budgets, I'd like to be able to create just one report layout and then tell FRx which one to use when I run the report. Is that possible? -- Bud Cool, Accounting System Manager HDA, Inc. Hazelwood, MO GP 9.0, SP2 No, it's not possible. You could create two column layouts and choose between them prior to generating the...

Horizontal axis running over chart.
I have two columns that I'm plotting in a line chart. I'm using Excel 2007. Dates are in the left column and prices in the right. It plots fine except the horizontal axis of dates are going across the middle of the chart. I'd like them below the chart. Also, my specific dates aren't plotted. I have a date for each corresponding price. How do I correct both of these issues? ...

Error after report is run.
So after the report finishes it gets downloaded to the desktop fine but there is an error that comes up "error mainCausalCode()". You click ok on that error box and everything is fine but I'm just wondering why that error even comes up? Any help? thanks!!!! Hi, Sounds like faulty VBA code. Which could be in a number of places and which could be doing who knows what. Do you know anything about VBA programming? If not, you will want to ask someone who does to take a look at the code behind the process. If so, you can attempt to debug it in the VBA Editor;...

"a dialog is open" error, adding contacts in outlook
this 'a dialog box is open error' seems to be a plague... someone at work is getting it when she tries to add a new personal contact, when she clicks the "save and new" button. KBase article 223664 seems to describe this problem, but they say "When you attempt to add a user from your Global Address List (GAL) to your Personal Address Book (PAB), you may receive the following error message: A dialog is open. Close it and try again. When you click OK, the new contact dialog box remains open and the contact information is added to your contacts. " after reading t...

.net error when running sales order example
Hi, while trying to run the sales order example, I get the following error: System.Runtime.Serialization.SerializationException: Cannot find the assembly Microsoft.GreatPlains.eConnect I have both the eConnect and eConnectSerilization8 dlls referenece and imported into the application. The server where the database resides is mapped through a vpn. I'm pretty sure I have the connection string setup right, as it's not all that complicated. Can anyone point me in the right direction? Thanks It throws the error on the eConnect.Dispose() line. It seems to get passed the entry_...

minimising a dialog
Hi, I want to minimise my dialog, but i've removed the minimize / maximise buttons. I'm going to use one of my own buttons, but I don't know how to call the minimisation. I've removed the exit button, but have created my own one instead. However, one draw back of removing the title bar etc is that in the system tray thing (not sure what it's called) at the bottom middle of my screen, with most applications it shows the name, and then a right click will give the optinos of closing, maximising etc. Anyway, these are now not there. How do I fix this? Any help much appreciat...

Remove "This message was converted to plain text" dialog
I convert all my mail from HTML to plain text, and I want to remove the "This message was converted to plain text" dialog box in the messages so that no one can go back to the original HTML. Does anyone know how to do that with a GPO or registry edit? - Matt AFAIK, there is no policy or reg edit that can change it. FWIW, HTML in Outlook is quite safe. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http:...

How disable OK/Cancel event in DIalog ???
Hello, Is it possible to disable the OK[Return]/Cancel[ESC] event in Dialog ??? Eric -- ========================== If you know what you are doing, it is not called RESEARCH! ========================== Its simple Override ::OnCancel() & ::OnOk() methods. and never call the base class member OnCancel() and OnOk() Best regards DAK "Eric Chow" <echow@macaucabletv.com> wrote in message news:<enAmDDrJEHA.2904@TK2MSFTNGP09.phx.gbl>... > Hello, > > Is it possible to disable the OK[Return]/Cancel[ESC] event in Dialog ??? > > Eric I'm not exactly ...

Run-time 438
I've had this trouble in various different bits of code and can't figure out how to correct it. Here's the situation: I've selected an item from a ListBox contained within a UserForm. The UserForm appears on sheet "A". Once I select the item, Excel gets busy populating a whole bunch of stuff on sheet "B". In the process it is supposed to check to see if the value of OptionButton1 on sheet "B" is "True". The bit of code that it has trouble with is this: If Worksheets("B").Shapes("OptionButton1")....

Powerpoint Master Bullets Problem
I'm using Powerpoint 2003 and trying to take an old presentation and re-brand it with a new template. I have a saved template with a master containing the format and bullet points that I want. So I select all slides in the old presentation, copy, and paste into my new template. This was working for me earlier with other presentations, but now using a different set of presentations, the bullet points are not adhering to the master slide. They are just staying the same as the old one. Can someone help me figure out why the bullets won't change to the master slide t...

GP10 Security task for Run Integration
Can GP 10 security be structured to allow users access to Run Integration but not allow access to Integration Manager or Table Import on the Tools menu? Hello, If you set access for a user to run integrations or table import, they will be seeing the IM on GP. -- Thanks Janakiram M.P. MCP-GP http://janakirammp.blogspot.com "irishjamr" wrote: > Can GP 10 security be structured to allow users access to Run Integration but > not allow access to Integration Manager or Table Import on the Tools menu? I want to make sure I understand how you want to do this. Do you want us...

Run time error
Good day, I'm getting the -2147352567 (80020009) runtime error when I attempt to access a editable form. Along with the runtime error a message states that the recordset isn't updateable. Any information will be appreciated. Thanks. There are many circumstances that make a recordset not updateable. Here is a link to more information http://www.allenbrowne.com/ser-61.html Jeanette Cunningham "WD" <WD@discussions.microsoft.com> wrote in message news:9FBAFD9D-9B51-48B3-97AC-E068555CDFBF@microsoft.com... > Good day, > > I'm getting the -2147352567 (8002...

Adding running total to union query
I posted this before and thought I had a solution. Unfortunately, it became too large and I received a "Query is too complex" error, so now I'd like to try a different approach... I have created a Union Query to consolidate results from separate queries, each one of which represents results for a single month: SELECT ReportMonth, MonthlyRev, MonthlyCost FROM qryMonth1Total UNION SELECT ReportMonth, MonthlyRev, MonthlyCost FROM qryMonth2Total UNION SELECT ReportMonth, MonthlyRev, MonthlyCost FROM qryMonth3Total; etc. (12 months total) This gives me the following results: ...

Macros running slow in Excel 2003
Does anyone know why macros that ran ok in Excel 2000 now take foreve in Excel 2003? This affects any kind of macro and turning Aut Recalculation On and Off does not help -- ebeltran ...

How do I run a macro with an activex button?
...

Live Display in a Modal Dialog
I have an application that uses a worker thread to handle some external hardware. One of the things it does is collect a couple of data values. At a point in the program, I need to have the user make a manual adjustment to the external hardware and ai would like to pop up a modal dialog telling the user the target value of a variable as well as the current value and allow the user to make the adjustment until the two values match. How do I display the current value in real time on the modal dialog? I understand how to display a variable on the dialog but how do I make that display a li...

Excel sheet truncated after copying to powerpoint slide #2
Hi, We are using Office 2000 with sp3. When we copy excel sheet to power point slide, some of the rows and colums are truncated. Also the font size is changed. We can see only some part of the sheet. Let me know if anybody faced this problem.. Thanks in advance Shekar. "Shekar" <shekar@mcsb.com> wrote in message news:udouUt8hDHA.1536@TK2MSFTNGP12.phx.gbl... > > Hi, > > We are using Office 2000 with sp3. When we copy excel sheet to power > point slide, some of the rows and colums are truncated. Also the font > size is changed. We can see only some part of ...

stored proc runs incorrectly from ReportServer2005
RI have a report that was originally created in RS2000. This one report calls a stored proc and displays data, and the stored proc also writes the underlying data to a history table. This was working correctly for years when using ReportServer2000 agains sql server 2000. We then had to migrate Reporting Services to RS2005, but we are still using Sql Server 2000 on a win2003 server OS (the box is a workstation box - we had a catastrophic failure on the main server box and this is the temp fix - but it will be temp for a while). The problem is that when we run this report...