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. list in mfc

list in mfc

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
7 Posts 5 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.
  • K Offline
    K Offline
    kamalesh82
    wrote on last edited by
    #1

    How can i access(by iterating)list in the file, which is supplied dynamically(browsing to select file using CFileDialog)during the execution in vc++(mfc) project?? kamalesh

    L H 2 Replies Last reply
    0
    • K kamalesh82

      How can i access(by iterating)list in the file, which is supplied dynamically(browsing to select file using CFileDialog)during the execution in vc++(mfc) project?? kamalesh

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Use CFileDialog::GetPathName() to get the path of the file. Then open the file. Then read the data from the file.

      K 1 Reply Last reply
      0
      • L led mike

        Use CFileDialog::GetPathName() to get the path of the file. Then open the file. Then read the data from the file.

        K Offline
        K Offline
        kamalesh82
        wrote on last edited by
        #3

        ya i already used that.frm thre i can read only the 1st list.but iterating the list using Clist, it's not happening. can u tell me that? how to iterate in this file? kamalesh

        Z D 2 Replies Last reply
        0
        • K kamalesh82

          ya i already used that.frm thre i can read only the 1st list.but iterating the list using Clist, it's not happening. can u tell me that? how to iterate in this file? kamalesh

          Z Offline
          Z Offline
          Zac Howland
          wrote on last edited by
          #4

          If you set the OFN_ALLOWMULTISELECT flag for the dialog, you use the following code to iterate through the list of path names: CFileDialog dlg(...); // use appropriate settings if (dlg.DoModal() == IDOK) { POSITION pos = dlg.GetStartPosition(); while (NULL != pos) { CString newPath = dlg.GetNextPathName(pos); // do something with newPath } Is that what you are trying to do? If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac -- modified at 15:29 Wednesday 21st June, 2006

          1 Reply Last reply
          0
          • K kamalesh82

            ya i already used that.frm thre i can read only the 1st list.but iterating the list using Clist, it's not happening. can u tell me that? how to iterate in this file? kamalesh

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            kamalesh82 wrote:

            frm thre i can read only the 1st list

            What list? Are you trying to read the contents of the selected file?

            kamalesh82 wrote:

            ...but iterating the list using Clist...

            How are you using CList?


            "The largest fire starts but with the smallest spark." - David Crow

            "Judge not by the eye but by the heart." - Native American Proverb

            L 1 Reply Last reply
            0
            • D David Crow

              kamalesh82 wrote:

              frm thre i can read only the 1st list

              What list? Are you trying to read the contents of the selected file?

              kamalesh82 wrote:

              ...but iterating the list using Clist...

              How are you using CList?


              "The largest fire starts but with the smallest spark." - David Crow

              "Judge not by the eye but by the heart." - Native American Proverb

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              and let me add... :confused:

              1 Reply Last reply
              0
              • K kamalesh82

                How can i access(by iterating)list in the file, which is supplied dynamically(browsing to select file using CFileDialog)during the execution in vc++(mfc) project?? kamalesh

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

                if you want to read file and directory names with CListBox use DlgDirList_**


                **_

                whitesky


                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