Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

CComboBox with Multiple Columns

How do I modify the CComboBox to support multiple columns. Thankyou for you help, please email responses to  jlundgre@igate.sprint.com AND lundgren@qni.com
0
lundgren
Asked:
lundgren
1 Solution
 
davmarcCommented:
You necessarily have to implement an owner-draw combo box.
In particular follow the following steps:
1) Derive your own class from MFC's CComboBox
2) Implement the virtual functions you need among DrawItem(), MeasureItem(), CompareItem() and DeleteItem(). They allow you to put your custom drawing code to accomplish extended appearances.
You may also want to store additional data for the multiple columns of your combo boxes; add some data members to your CComboBox derived class and refer to them in your owner drawing code.

I am sending a copy of this answer to the two E-Mail addresses you gave, too. Remember to grade this answer on Expert Exchange anyway!

Davide Marcato.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now