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. Starting a particular windows app ( such as word.exe or acrobat.exe) @ particular co-ordinates on your desktop

Starting a particular windows app ( such as word.exe or acrobat.exe) @ particular co-ordinates on your desktop

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
4 Posts 3 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.
  • F Offline
    F Offline
    Fahad Ahmed
    wrote on last edited by
    #1

    I need to launch a windows app. @ particular co-ordinates on my extended windows desktop, from within a MFC Dialog. I can launch the app. fine, but dont know how to launch it at a particular position. I also know that if I position the app to the appropriate position and close it,it will come up in the same position the next time its launched, but thats not really the way I want to do it. Any one has a clue?

    M 1 Reply Last reply
    0
    • F Fahad Ahmed

      I need to launch a windows app. @ particular co-ordinates on my extended windows desktop, from within a MFC Dialog. I can launch the app. fine, but dont know how to launch it at a particular position. I also know that if I position the app to the appropriate position and close it,it will come up in the same position the next time its launched, but thats not really the way I want to do it. Any one has a clue?

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Use CreateProcess() and in the STARTUPINFO struct, fill in the dwX, dwY, dwXSize, and dwYSize members. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Actual sign at the laundromat I go to: "No tinting or dying."

      F 1 Reply Last reply
      0
      • M Michael Dunn

        Use CreateProcess() and in the STARTUPINFO struct, fill in the dwX, dwY, dwXSize, and dwYSize members. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Actual sign at the laundromat I go to: "No tinting or dying."

        F Offline
        F Offline
        Fahad Ahmed
        wrote on last edited by
        #3

        Unfortunately, I am using ShellExecute() to launch the process, did that because we wanted for the app. to come up in its default program. i.e if its a word doc, MS word will launch it. If its a pdf adobe acrobat will launch it. and unfortunately ShellExecute() doesn't let you pass position parameters. Any other ideas?

        B 1 Reply Last reply
        0
        • F Fahad Ahmed

          Unfortunately, I am using ShellExecute() to launch the process, did that because we wanted for the app. to come up in its default program. i.e if its a word doc, MS word will launch it. If its a pdf adobe acrobat will launch it. and unfortunately ShellExecute() doesn't let you pass position parameters. Any other ideas?

          B Offline
          B Offline
          Big Art
          wrote on last edited by
          #4

          Determine the files associated executable by looking in the registry then use CreateProcess to launch the executable and the file thus allowing you to use the position control available with CreateProcess(). Art

          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