In .NET land, there's the tremendously useful System.Windows.Forms.CheckedListBox class.
What is the equivalent in Window开发者_运维知识库s Common Controls land? (if any)
Turn a list view into one with checkboxes. If you want it similar to a ListBox, only use 1 column.
ListView_SetExtendedListViewStyle (handle, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
Almost identical UI can be developed with the List View control by using item state images.
But selection management and other functionalities need to be implemented manually.
This article might be of interest for you. In short windows allows quite easily to implement checkboxes in Listbox and combobox through custom drawing and messaging.
精彩评论