Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

The multicolumn pop-up list box (See a screenshot) is implemented in the CExtComboBoxBase base class. The CExtComboBox class is derived from CExtComboBoxBase and simply makes the combo box drawn in the flat XP style. To turn on the multicolumn feature, just open the resource editor and make it owner-drawn (select Fixed or Variable in the Ownerdraw combo box) and apply the Has Strings style.

The following methods and properties allow you to manipulate the content of the multicolumn list box:

CExtComboBoxBase class

Value Meaning
LbItemGet() Returns a pointer to a CExtComboBoxBase::LB_ITEM object which keeps information about the cells in the specified row.
LbColumnWidthGet/LbColumnWidthSet() Gets/sets a width for the specified column.

CExtComboBoxBase::LB_ITEM class

Value Meaning
LbItemCellInsert() Inserts a new cell at the specified position.
LbItemCellRemove() Removes a cell at the specified position.
LbItemCellGet() Returns a pointer to a CExtComboBoxBase::LB_ITEM::CELL object, which keeps information about the cell at the specified position.
LbItemCellGetCount() Returns a number of the cells.

CExtComboBoxBase::LB_ITEM::CELL class

Value Meaning
m_nLParam Specifies the user-defined data.
m_clrText Specifies the text color.
m_clrBack Specifes the background color.
m_sItemText Specifies the text.

You can download a simple TextComboGrid project that shows how to create a combo box filled with the local URL history. It features Last Access Date, Title and Url columns and also demonstrates how to use custom text/background colors.