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 HDD files in CListView

List HDD files in CListView

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

    Is there any method to list files from local HDD into a CListView, but, most important, have two points: 1. Have an item icon just like you see in standard windows explorer. 2. Have right click menu just like you have in standard windows explorer.

    L D 2 Replies Last reply
    0
    • _ _Flaviu

      Is there any method to list files from local HDD into a CListView, but, most important, have two points: 1. Have an item icon just like you see in standard windows explorer. 2. Have right click menu just like you have in standard windows explorer.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Yes, all of this is possible, but you will need to write the code to do it. Lots of suggestions for the first part in list directory c - Google Search[^].

      _ 1 Reply Last reply
      0
      • L Lost User

        Yes, all of this is possible, but you will need to write the code to do it. Lots of suggestions for the first part in list directory c - Google Search[^].

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

        No, there is no problem listing files found on HDD, but setup them an icon (in CListView of course) just like Windows Explorer does, and then have the same contextual menu like Windows Explorer has ...

        L 1 Reply Last reply
        0
        • _ _Flaviu

          Is there any method to list files from local HDD into a CListView, but, most important, have two points: 1. Have an item icon just like you see in standard windows explorer. 2. Have right click menu just like you have in standard windows explorer.

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

          _Flaviu wrote:

          1. Have an item icon just like you see in standard windows explorer.

          See here.

          _Flaviu wrote:

          2. Have right click menu just like you have in standard windows explorer.

          See here.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          _ 1 Reply Last reply
          0
          • _ _Flaviu

            No, there is no problem listing files found on HDD, but setup them an icon (in CListView of course) just like Windows Explorer does, and then have the same contextual menu like Windows Explorer has ...

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Windows Explorer uses a splitter window. The left hand pane is a TreeView and the right is (usually) a ListView. Both Windows controls are clearly documented on MSDN.

            1 Reply Last reply
            0
            • D David Crow

              _Flaviu wrote:

              1. Have an item icon just like you see in standard windows explorer.

              See here.

              _Flaviu wrote:

              2. Have right click menu just like you have in standard windows explorer.

              See here.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              _ Offline
              _ Offline
              _Flaviu
              wrote on last edited by
              #6

              I am really sorry because I was not clear on my first post. Let say I list a text file in my CListView. And I must setup an icon to that item, but that icon should be exactly like in windows explorer. I mean, if a text file in windows explorer has a Notepadd++ icon, I wish the same icon to my CListView. The same matter if I list a pdf file ... if this file has a pdf icon in windows explorer, I wish to have the same icon to the item that list that pdf file in my CListView. And if I see in windows explorer a contextual menu, I wish to have the same contextual menu in my CListView.

              D 1 Reply Last reply
              0
              • _ _Flaviu

                I am really sorry because I was not clear on my first post. Let say I list a text file in my CListView. And I must setup an icon to that item, but that icon should be exactly like in windows explorer. I mean, if a text file in windows explorer has a Notepadd++ icon, I wish the same icon to my CListView. The same matter if I list a pdf file ... if this file has a pdf icon in windows explorer, I wish to have the same icon to the item that list that pdf file in my CListView. And if I see in windows explorer a contextual menu, I wish to have the same contextual menu in my CListView.

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

                For icons, see here and here.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                _ 1 Reply Last reply
                0
                • D David Crow

                  For icons, see here and here.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  _ Offline
                  _ Offline
                  _Flaviu
                  wrote on last edited by
                  #8

                  Ok, thank you, I guess I am on the right road regarding icons ... remain only context menu :)

                  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