7.1. How do I add a combobox to my toolbar?

Microsoft Visual C++/Microsoft Foundation Classes


7.1. How do I add a combobox to my toolbar?

You can do this using the CToolBar::SetButtonInfo() method. The MFC sample ctrlbars shows how to do this in file mainfrm.cpp. Basically you call SetButtonInfo to create a blank space (TBBS_SEPARATOR)for the combo box, with the resource ID of the help and tool tip for the combobox. You then use GetItemRect to get the bounding rectangle of the combobox, and create a combobox window of your own in that space.

[email protected], 6/1/95 [email protected] - updated.