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