changing a text box's background color

could some1 plz elaborately tell me how to change the background color of a text-box? like, step by step process? any help would be greatly appretiated!

i have tried searching for similar keywords but the replys were unclear to me...


  • You should subclass the CEdit control and override the WM_CTLCOLOR_REFLECT message. The write the code similar to this :

    HBRUSH CSubEdit::CtlColor(CDC* pDC, UINT nCtlColor)
    return (HBRUSH)m_Brush; // member CBrush created with m_BackCOlor

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion