ComboBox with Item Tooltips
|

Environment: VC6 SP5, NT4 SP6 ( not tested on other OS )
To use this combo box, follow the following steps:
- Include TooltipComboBox.h, TooltipComboBox.cpp, TooltipListCtrl.h and TooltipListCtrl.cpp in your project.
- In the resource editor create a droplist combobox.
- Create a control member variable for the combobox in VC's classwizard.
- Include TooltipComboBox.h and replace CComboBox with CTooltipComboBox in your .h file. Also include afxtempl.h to support CMap.
- 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
|
IT Offers
Partners
More for Developers
Latest Developer Headlines
Top Authors
- Voted: 13 times.
- Voted: 11 times.
- Voted: 11 times.
- Voted: 10 times.
- Voted: 8 times.
- Paul Kimmel 78 articles
- Tom Archer - MSFT 75 articles
- Zafir Anjum 61 articles
- Bradley Jones 44 articles
- Marius Bancila 32 articles



