Click to See Complete Forum and Search --> : how to make aComboBox that looks like the explorer one


Sjoerd
April 27th, 1999, 05:08 AM
the technicalities first:
This is made in VC5 and I'm not allowed to use CComboBoxEx

I created an CComboBox with the following alterations
DropdownList
Ownerdrawn, Has strings

I did a SetDataItemPtr to accomodate an structure in it.

the things in the structure
hIcon
nIndent

in the DrawItem
I get the nIndent to move the text shown an number of times equal to nIndent.
there is only 1 problem I don't want the item shown in the static box to move in the static box only.

So in the listbox the item should be indented but not if the user has selected it and put it in the static box

Sjoerd
April 27th, 1999, 07:20 AM
the Comboboxedit value of itemstate in the Drawstruct