Re: Drop-down list with CBS_DROPDOWNLIST | CBS_OWNERDRAWVARIABLE in Vista

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello Jeffrey,

thanks for your response. I looked at the BeginBufferedAnimation/Paint
API, and found this Swing bug

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6435825

where people have apparently run into a similar problem. They
apparently coded everything themselves, which I would like to avoid if
at all possible.

I am currently using a standard combobox to choose fonts of various
sizes. The combobox is not editable, so it has the CBS_DROPDOWNLIST
style, which usually results in a "button" instead of a "edit field
+little button" look in Vista. But to show fonts of various sizes, I
have to paint the combobox items myself. So I use the
CBS_OWNERDRAWVARIABLE style. But with this style, presumably for
compatibility, Vista reverts to the "edit field+little button" look.
This last behaviour I would like to override.

If I don't use the CBS_OWNERDRAWVARIABLE style, custom-painting combo-
box items is difficult, in particular because my items have variable
height (otherwise inserting empty strings and painting on top of them
myself would still no be elegant, but easier). Thus I don't quite
understand what you mean by "subclassing a normal combobox and avoid
all of this".

Thanks for all your help,

Arno

.


Quantcast