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. CListBox vs. CListCtrl

CListBox vs. CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questionvisual-studio
3 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.
  • T Offline
    T Offline
    The Lady of Shallots
    wrote on last edited by
    #1

    I know that CListCtrl is newer and has more functionality, but I'm wondering what are the major differences between these 2 classes. In other words, why would people still use CListBox and why didn't MS just change it to incorporate new functionality? Sorry if this is a obvious question, newbie here. :) Thanks!

    J G 2 Replies Last reply
    0
    • T The Lady of Shallots

      I know that CListCtrl is newer and has more functionality, but I'm wondering what are the major differences between these 2 classes. In other words, why would people still use CListBox and why didn't MS just change it to incorporate new functionality? Sorry if this is a obvious question, newbie here. :) Thanks!

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      why would people still use CListBox It's simpler, if you don't want nifty features. why didn't MS just change it to incorporate new functionality Well this is just guessing, but the list control is a common control (which the list box is not), all of which are shipped in comctl32.dll. This DLL is frequently updated (by IE, for instance) to easily add more controls/features, and maybe changing the core list box control finds more restrictions from the point of view of software control in MS or anything. Maybe the've been developed by different teams. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      1 Reply Last reply
      0
      • T The Lady of Shallots

        I know that CListCtrl is newer and has more functionality, but I'm wondering what are the major differences between these 2 classes. In other words, why would people still use CListBox and why didn't MS just change it to incorporate new functionality? Sorry if this is a obvious question, newbie here. :) Thanks!

        G Offline
        G Offline
        Gary R Wheeler
        wrote on last edited by
        #3

        The list box is a builtin Windows control. It's purpose is to let the user select one or more items (usually strings) from a list that scrolls as necessary. The list box is relatively simple easy to use. The list control is one of the common controls. It provides a much broader range of interaction with the user (multiple views, bitmap support, multiple columns, sorting, etc.). This broader range comes at a price, however. The list control takes more effort (on the part of the application) to set up and use. Your choice of one over the other depends on what you need the application to do. The list box is good for simple selection tasks in a dialog. The list control handles tabular data, bitmaps, and drag-and-drop better. From the point of view of the programmer, the list box is much simpler to set up and use, as long as you're not trying anything fancy. The list control makes fancy interactions much easier.


        Software Zen: delete this;

        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