ComboBox with Item Tooltips | CodeGuru

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 […]

Written By
CodeGuru Staff
CodeGuru Staff
Apr 18, 2001
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

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

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.