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 can i open "xxxxx.bmp" through Program

How can i open "xxxxx.bmp" through Program

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 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.
  • P Offline
    P Offline
    phanindra varma
    wrote on last edited by
    #1

    hello... I want to open some "Output.bmp" in MSpaint, when i click "Display" button.How it is Possible????? Thanks in advance... KEEP SMILING.....

    S R H 3 Replies Last reply
    0
    • P phanindra varma

      hello... I want to open some "Output.bmp" in MSpaint, when i click "Display" button.How it is Possible????? Thanks in advance... KEEP SMILING.....

      S Offline
      S Offline
      SandipG
      wrote on last edited by
      #2

      Use ShellExecute or CreateProcess functions to spawn the MSPaint.exe and pass your file name "Output.bmp" as command line argument.

      Regards, Sandip.

      1 Reply Last reply
      0
      • P phanindra varma

        hello... I want to open some "Output.bmp" in MSpaint, when i click "Display" button.How it is Possible????? Thanks in advance... KEEP SMILING.....

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        I am assuming that Output.bmp is in D:\somefolder Now, try this:

        ShellExecute(NULL, _T("open"), _T("mspaint.exe"), _T("D:\\Somefolder\\Output.bmp"), NULL, SW_SHOW);

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        P 1 Reply Last reply
        0
        • P phanindra varma

          hello... I want to open some "Output.bmp" in MSpaint, when i click "Display" button.How it is Possible????? Thanks in advance... KEEP SMILING.....

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          SehllExecute or CreateProcess are helpfuls for you.

          1 Reply Last reply
          0
          • R Rajesh R Subramanian

            I am assuming that Output.bmp is in D:\somefolder Now, try this:

            ShellExecute(NULL, _T("open"), _T("mspaint.exe"), _T("D:\\Somefolder\\Output.bmp"), NULL, SW_SHOW);

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            P Offline
            P Offline
            phanindra varma
            wrote on last edited by
            #5

            Thanks...Its working Fine.... Thanku...

            R 1 Reply Last reply
            0
            • P phanindra varma

              Thanks...Its working Fine.... Thanku...

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              Good that it worked. You're welcome.

              phanindra varma wrote:

              Thanku

              Please don't use SMS language on these boards. My sincere request. :)

              Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

              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