Title: RE: [msvc] Text Color in Combo Drop-down Box


> -----Original Message-----
> From: BeginThread.com MSVC List [mailto:[EMAIL PROTECTED]]On Behalf
> Of David Stroupe
> Sent: 13 September 2003 17:40
> To: [EMAIL PROTECTED]
> Subject: [msvc] Text Color in Combo Drop-down Box
>
>
> I have an owner drawn combo box.  I seem to be able to control the text
> color of everything except for the strings in the drop-down selection
> box.  Is there a way to do this?

If you add a handler for the WM_DRAWITEM message (within your derived combo
box class / subclassed WndProc), that is where it should be done - in fact,
it should fail to work unless you DO handle that. The DRAWITEMSTRUCT passed
to you has an hDC member which you can temporarily attach to a CDC (MFC) or
just use direct (API), and call SetTextColor() and / or SetBkColor() on it
to control the text colour of the items you draw.

--
Jason Teagle
[EMAIL PROTECTED]

Reply via email to