ComboBox with Item Tooltips

Environment: VC6 SP5, NT4 SP6 ( not tested on other OS )

To use this combo box, follow the following steps:

  1. Include TooltipComboBox.h, TooltipComboBox.cpp, TooltipListCtrl.h and TooltipListCtrl.cpp in your project.
  2. In the resource editor create a droplist combobox.
  3. Create a control member variable for the combobox in VC's classwizard.
  4. Include TooltipComboBox.h and replace CComboBox with CTooltipComboBox in your  .h file. Also include afxtempl.h to support CMap.
  5. To have your own tips, you can either use SetItemTip, SetComboTip functions, or replace GetItemTip function in CTooltipListCtrl, and GetComboTip function in CTooltipComboBox.

Cause this combo box uses CComboBox's listbox to store items, it has no special behavior, and can be used a usual CComboBox. It uses Hai Ha's article style to replace standard drop-down list with a virtual list control. A virtual one to prevent having two identical lists. Only droplist combo style is currently working like standard CComboBox.

I think the code is simple enough and doesn't need any other comments.

Downloads

Download source - 6 Kb