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. getting complete file path

getting complete file path

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

    i m trying to get the complete file path on pressing a browse button....i know abt a method GetFilePath but it does not work

    R _ 2 Replies Last reply
    0
    • M MahaKh

      i m trying to get the complete file path on pressing a browse button....i know abt a method GetFilePath but it does not work

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

      Show us the code inside the browse button handler.

      It is a crappy thing, but it's life -^ Carlo Pallini

      M 1 Reply Last reply
      0
      • M MahaKh

        i m trying to get the complete file path on pressing a browse button....i know abt a method GetFilePath but it does not work

        _ Offline
        _ Offline
        _Superman_
        wrote on last edited by
        #3

        If you are using CFileDialog class you can use the CFileDialog::GetPathName.

        «_Superman_» I love work. It gives me something to do between weekends.

        M 1 Reply Last reply
        0
        • R Rajesh R Subramanian

          Show us the code inside the browse button handler.

          It is a crappy thing, but it's life -^ Carlo Pallini

          M Offline
          M Offline
          MahaKh
          wrote on last edited by
          #4

          CFileDialog dlg(true); CString path=dlg.getFileName(); this code returns only the file name...but what i want is comple path of that file...

          1 Reply Last reply
          0
          • _ _Superman_

            If you are using CFileDialog class you can use the CFileDialog::GetPathName.

            «_Superman_» I love work. It gives me something to do between weekends.

            M Offline
            M Offline
            MahaKh
            wrote on last edited by
            #5

            ooh yes...sorry i have used getPathName method instead...it was the typing mistake.... i havnt got the result by using GetPathName method

            D 1 Reply Last reply
            0
            • M MahaKh

              ooh yes...sorry i have used getPathName method instead...it was the typing mistake.... i havnt got the result by using GetPathName method

              D Offline
              D Offline
              Divyang Mithaiwala
              wrote on last edited by
              #6

              MahaKh wrote:

              i have used getPathName

              If that doesn't work then you may try GetFolderPath along with GetFileName of CFileDialog.


              Do not trust a computer... Always check what computer is doing regards, Divyang Mithaiwala Software Engineer

              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