CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Posts
    30

    PowerPoint Thumbail

    Does anyone know how to show the slides of a power point presentation as a Thumbnail on a Dialog app? Is that possible?

    Thanks in advance.

  2. #2
    Join Date
    Apr 2001
    Location
    taiwan
    Posts
    28

    a easy way to get the thumbnail of PowerPoint to clipboard

    CString strFileName;


    TCHAR szFilters[]="PowerPoint Files (*.ppt)||";

    CFileDialog fileDlg (TRUE, "ppt", "*.ppt",

    OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);


    if( fileDlg.DoModal ()==IDOK )
    {
    strFileName = fileDlg.GetPathName();

    CoInitialize(NULL);

    _Application m_ppt;

    if(m_ppt.CreateDispatch("PowerPoint.Application"))

    {

    COleVariant var;

    Presentations presentations = m_ppt.GetPresentations();

    presentations.Open(strFileName,0,0,0);

    var = presentations.GetCount();

    _Presentation pre = presentations.Item(var);

    Slides slides = pre.GetSlides();

    var = slides.GetCount();



    //Copy the lastest thumbnail to clipboard

    _Slide slide = slides.Item(var);

    slide.Copy();

    m_hBitmap = NULL;

    }

    else

    {//Can't find the powerpoint

    TRACE("CreateDispatch Error\n");

    ASSERT(0);

    }

    CoUninitialize();
    }

    else

    {//Select no any one .ppt

    }

  3. #3
    Join Date
    Jul 2002
    Posts
    30

    Thanks!

    Thanks alan_doh

    That was an old project I was working on. At that time I ended up given up and forget about the thumbnail thing.

    I'll try andlet you know!!

    Thanks again,

    Ric

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured