Author Topic: Checked Combobox and Listbox revisited using different aproach  (Read 929 times)

Offline DMac

  • Member
  • *
  • Posts: 271
Checked Combobox and Listbox revisited using different aproach
« on: December 24, 2021, 05:55:19 PM »
Pelles C Forum,

I revisited Checked Combo and List box customization.  This time, instead of wrapping a control in another window, I hook the parent and intercept WM_DRAWITEM.  I was inspired by Pelle's example ODMenu but found that the application of the technique presented special challenges when it came to individual controls that could be duplicated within a dialog (as opposed to a single toolbar and menu bar) or potentially on two or more dialogs simultaneously.  These controls retain the normal behavior when it comes to item data.  My previous checked controls used the item data to store check state, making it impossible to directly associate user data with the items.

Here are some screen shots of the controls.

Code for the controls can be found with accompanying article (a usage reference) at the code project.

Check It Out 2.0, One Step Win32 SDK C Checked Combo and List Boxes

No one cares how much you know,
until they know how much you care.