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. Problem with file association

Problem with file association

Scheduled Pinned Locked Moved C / C++ / MFC
csharpquestionc++phpvisual-studio
4 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.
  • M Offline
    M Offline
    marcogja
    wrote on last edited by
    #1

    I've got a problem. I Want that when you press the button (see link plz) open a pdf file with the instructions of use. http://www.imagecash.net/image.php?file=265709030 I can open file use this code ShellExecute(this->m_hWnd,"open", "C:\\motor.pdf","","",SW_SHOW ); But this program is to use for many people, and the path changes computer to computer. How can I solve this? How can I make a setup that includes MFC files with microsoft visual studio 6? thx

    _ C T 3 Replies Last reply
    0
    • M marcogja

      I've got a problem. I Want that when you press the button (see link plz) open a pdf file with the instructions of use. http://www.imagecash.net/image.php?file=265709030 I can open file use this code ShellExecute(this->m_hWnd,"open", "C:\\motor.pdf","","",SW_SHOW ); But this program is to use for many people, and the path changes computer to computer. How can I solve this? How can I make a setup that includes MFC files with microsoft visual studio 6? thx

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      You can open the file Open dialog Ask the user to select the file to open Get the path from that fileopen dialog. and then use ShellExecute with that path Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

      1 Reply Last reply
      0
      • M marcogja

        I've got a problem. I Want that when you press the button (see link plz) open a pdf file with the instructions of use. http://www.imagecash.net/image.php?file=265709030 I can open file use this code ShellExecute(this->m_hWnd,"open", "C:\\motor.pdf","","",SW_SHOW ); But this program is to use for many people, and the path changes computer to computer. How can I solve this? How can I make a setup that includes MFC files with microsoft visual studio 6? thx

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Holy cow !! When posting, inform people that your link contains not worksafe contents !

        marcogja wrote:

        But this program is to use for many people, and the path changes computer to computer.

        That seems logical no ? It won't start a search on your computer to find the required file. Supply the file with the program and put it in a specific folder where it can be found, that's the standard solution.

        marcogja wrote:

        How can I make a setup that includes MFC files with microsoft visual studio 6?

        Does that have something to do with your previous question :confused: ? If yes, I don't understand.


        Cédric Moonen Software developer
        Charting control

        1 Reply Last reply
        0
        • M marcogja

          I've got a problem. I Want that when you press the button (see link plz) open a pdf file with the instructions of use. http://www.imagecash.net/image.php?file=265709030 I can open file use this code ShellExecute(this->m_hWnd,"open", "C:\\motor.pdf","","",SW_SHOW ); But this program is to use for many people, and the path changes computer to computer. How can I solve this? How can I make a setup that includes MFC files with microsoft visual studio 6? thx

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          marcogja wrote:

          can open file use this codeShellExecute(this->m_hWnd,"open","C:\\motor.pdf","","",SW_SHOW );

          either keep that path in any inifile or ask user about file path when ever you Application run!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          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