Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Support for Image List in CExtComboBox? Collapse All
Subject Author Date
Sachin Gupta Jul 8, 2006 - 8:44 PM

I have been struggling with this for past few days -

Is there a support for Image list in CExtComboBox? I have a toolbar where I insert a CExtComboBox which list all the fonts of system. I also show a small bitmap next to the names of fonts to say if they are True Type or not. This works fine when I use CComboBox, but with CExtComboBox, all I see is some junk characters and the bitmap also doesnt show up!

What more do I need to do?

Thanks,
Sachin

Sachin Gupta Jul 9, 2006 - 4:58 PM

I have uploaded a sample application which has the problem.
http://rapidshare.de/files/25405074/TestProfuis.zip.html

You can notice that I have overwridden DrawItem method as well.

Just by changing CExtComboBox to CComboBox I dont see the issue

Please help.

Thanks,
Sachin

Technical Support Jul 10, 2006 - 9:27 AM

Please replace the following line in the CMyCombo::DrawItem() method:

SA_FONTITEM_PPG* pFI = (SA_FONTITEM_PPG*)lpDIS->itemData;
with this
SA_FONTITEM_PPG* pFI = (SA_FONTITEM_PPG*)GetItemData( lpDIS->itemID );
Since we added support for the auto filter popup list box with multiple columns, we have used the item data to store information about the items. So now you cannot directly use the item data. You should call the GetItemData() method or send the CB_GETITEMDATA message instead.