views:

38

answers:

1

Hello,
I've created a custom combobox with DrawMode = OwnerDrawVariable. Everything is fine, except it doesn't use visual styles anymore in DropDownList mode, i.e. it looks like old combobox. How can I make it drawn using visual styles? I checked VisualStyleElement class but haven't found there anything that could help me.

Does it mean that OwnerDraw combobox can't be drawn with visual styles???

+1  A: 

I don't see anything in the 7.0 version of the SDK that allows drawing that style. The ComboBoxRenderer class doesn't pay attention to DropDownStyle at all. I think you're stuck.

Hans Passant
Am I right that it is Windows itself who decides how to paint combobox (themed or not) based on a flag (CBS_OWNERDRAWFIXED or CBS_OWNERDRAWVARIABLE)? If yes, then it means there is no way to make it themed?
nightcoder
Yes. It no doubt suppresses the custom style for appcompat reasons.
Hans Passant