Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get handle of PowerPoint window from taskbar?

How to get handle of PowerPoint window from taskbar?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontestingtoolstutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Md Ali Naser Khan
    wrote on last edited by
    #1

    I am using PowerPoint automation to display PowerPoint file from my project. But sometimes the PowerPoint file is displaying behind my main application. How can I get the handle of the PowerPoint window from my project?

    E 1 Reply Last reply
    0
    • M Md Ali Naser Khan

      I am using PowerPoint automation to display PowerPoint file from my project. But sometimes the PowerPoint file is displaying behind my main application. How can I get the handle of the PowerPoint window from my project?

      E Offline
      E Offline
      Eytukan
      wrote on last edited by
      #2

      You can keep your application behind the ppt by using

      this->SetWindowPos(&this->wndBottom,,,,,)

      Also to get your ppt window, you can use FindWindow("WindowName",NULL);

      He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

      M 1 Reply Last reply
      0
      • E Eytukan

        You can keep your application behind the ppt by using

        this->SetWindowPos(&this->wndBottom,,,,,)

        Also to get your ppt window, you can use FindWindow("WindowName",NULL);

        He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

        M Offline
        M Offline
        Md Ali Naser Khan
        wrote on last edited by
        #3

        _Application app; app.CreateDispatch( "PowerPoint.Application" ); ......... SlideShowSettings m_pptSlideShowSettings; ......... // Run the slide m_pptSlideShowSettings.Run(); How can I get the handle of the running slide window? What will be the "WindowName" name in the function FindWindow("WindowName",NULL);

        E 1 Reply Last reply
        0
        • M Md Ali Naser Khan

          _Application app; app.CreateDispatch( "PowerPoint.Application" ); ......... SlideShowSettings m_pptSlideShowSettings; ......... // Run the slide m_pptSlideShowSettings.Run(); How can I get the handle of the running slide window? What will be the "WindowName" name in the function FindWindow("WindowName",NULL);

          E Offline
          E Offline
          Eytukan
          wrote on last edited by
          #4

          Sorry for the typo that's the classname of the applicaiton. If you want to catch using the name displayed on the title bar, you should past it as the second argument. Open a notepad, minimize it. Then run the below code:

          HWND h = FindWindow(NULL,"Notepad");
          ShowWindow(h,SW_MAXIMIZE);

          He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups