EXPERTS: How to change background color of ActiveX subclassed from an Edit/Combo control?
I have an edit box and a combo box subclassed from an ATL ActiveX control (done with the wizard). How can I change the background and text colors on an event (for example OnClick).
I tried using WM_CTLCOLOREDIT but that only works on the edit box...
I also tried using a composite control with MFC support and planting a CEdit on it, but I don't know how to go on from there concerning the colors.
Any help would be appriciated...
Thanks,
Oren
Re: EXPERTS: How to change background color of ActiveX subclassed from an Edit/Combo control?
Surely if you are deriving your class from the class from an Editbox Control,
you can simply overide painting functions through a message map?
Re: EXPERTS: How to change background color of ActiveX subclassed from an Edit/Combo control?
If you mean painting the rectangle of the edit box, then it doesn't work, because then the text disappears...
I was looking for a more generic solution that preferably would also work for ATL.
Re: EXPERTS: How to change background color of ActiveX subclassed from an Edit/Combo control?
Hi there,
Does changing of color for disabled edit boxes in composite controls work? I tried using WM_CTLCOLOREDIT message but it doesn't work for disabled edit boxes. I even tried WM_CTLCOLORSTATIC. It doesn't seem to work.
I know that this is irrelevant to your question but I was working on this last week. I was curious about it.
thanx,
mohan