2

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???

nightcoder
  • 13,149
  • 16
  • 64
  • 72

1 Answers1

2

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
  • 922,412
  • 146
  • 1,693
  • 2,536
  • 1
    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 Jan 24 '10 at 18:29
  • Yes. It no doubt suppresses the custom style for appcompat reasons. – Hans Passant Jan 24 '10 at 18:43