Hi,

In my non-MFC project, I added a edit box.. as par the requirements, i had
to set make it as read-only. I did that but this action changed its
background color. The workaround is to paint the background programatticaly
so ,as always, i proceeded to handle WM_CTLCOLOREDIT message. but this didnt
work. after a quick look at the documentation, i found that read-only edit
box doesnt send this message but sends WM_CTLCOLORSTATIC message. OK, no
problem... i removed WM_CTLCOLOREDIT message handler and added
WM_CTLCOLORSTATIC message handler. to my surprise, this was not getting
called even???? after browsing through the net i found that read-only edit
box sends WM_CTLCOLORBTN message!!! I want to know *why* it sends this
message? I could justify myself about WM_CTLCOLORSTATIC message but not
WM_CTLCOLORBTN!!! Why documentation says that read-only edit control will be
sent WM_CTLCOLORSTATIC?


------
Deepesh

Re: can someone answer this? possibly MS by David

David
Mon Nov 10 14:06:45 CST 2003

Deepesh:

Sorry for the confusion. I take it that WM_CTLCOLORBTN did work for you,
however?

I'll follow up with our SDK writers and find out if we can add this to the
documentation.

--
David Stewart
dstewart@online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.



"Deepesh" <neo_dapi@yahoo.com> wrote in message
news:OxGAUnqpDHA.2188@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> In my non-MFC project, I added a edit box.. as par the requirements, i had
> to set make it as read-only. I did that but this action changed its
> background color. The workaround is to paint the background
programatticaly
> so ,as always, i proceeded to handle WM_CTLCOLOREDIT message. but this
didnt
> work. after a quick look at the documentation, i found that read-only edit
> box doesnt send this message but sends WM_CTLCOLORSTATIC message. OK, no
> problem... i removed WM_CTLCOLOREDIT message handler and added
> WM_C