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 view control (non-MFC)

List view control (non-MFC)

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestionc++helpannouncement
2 Posts 2 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
    Kayembi
    wrote on last edited by
    #1

    Hi, I'm not sure whether this is a fairly straightforward question or a lot to ask, but here goes... I am creating a small file packing program. For selecting the files to pack, I am using a list box control with three button controls, "Browse", "Select All" and "Delete". Fairly straightforwardly, the combination of these controls lets the user browse for and select files to add to the list box, and to select and delete those items he or she wishes to get rid of etc. Everything is working great... Except that I have just realised that for this particular app the user is going to need to have the option to sort the items in the box by file type as well as by name. So I guess that means that I have to use a list _view_ control instead of a list box control, so that I can use multiple columns with headings and sort by them... However, I have fallen at the first hurdle, as I am having problems finding concise information about how to set this up (I am relatively new to coding). My main problem is probably that I'm using _NO_ MFC, and all the tutorials/examples I can find seem to use MFC. Also there is a vast amount of info and a _long_ list of message descriptions on MSDN, but I can't seem to find any straight WinAPI examples that show the basics of setting up and populating a multi-column list view. Could someone please point me towards a _NON_ MFC, standard C WinAPI tutorial/thread with info/any information at all on using list view controls to display a list of items with multiple columns? What I'm really aiming for is a simplified version of the sort of file list you get in WinZip or Windows Explorer (I just need to show file name, file type and path). Many thanks to anyone who can tell me where to begin, KB

    S 1 Reply Last reply
    0
    • K Kayembi

      Hi, I'm not sure whether this is a fairly straightforward question or a lot to ask, but here goes... I am creating a small file packing program. For selecting the files to pack, I am using a list box control with three button controls, "Browse", "Select All" and "Delete". Fairly straightforwardly, the combination of these controls lets the user browse for and select files to add to the list box, and to select and delete those items he or she wishes to get rid of etc. Everything is working great... Except that I have just realised that for this particular app the user is going to need to have the option to sort the items in the box by file type as well as by name. So I guess that means that I have to use a list _view_ control instead of a list box control, so that I can use multiple columns with headings and sort by them... However, I have fallen at the first hurdle, as I am having problems finding concise information about how to set this up (I am relatively new to coding). My main problem is probably that I'm using _NO_ MFC, and all the tutorials/examples I can find seem to use MFC. Also there is a vast amount of info and a _long_ list of message descriptions on MSDN, but I can't seem to find any straight WinAPI examples that show the basics of setting up and populating a multi-column list view. Could someone please point me towards a _NON_ MFC, standard C WinAPI tutorial/thread with info/any information at all on using list view controls to display a list of items with multiple columns? What I'm really aiming for is a simplified version of the sort of file list you get in WinZip or Windows Explorer (I just need to show file name, file type and path). Many thanks to anyone who can tell me where to begin, KB

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

      Read this You can also download ListView sample here

      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