CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    2

    How do I Change the Background Color of an edit box

    I have created an Edit control in the resource editor. I want to change to background color.
    this is what i have tried
    CRect editRect;
    m_CreditText->GetClientRect(&editRect);
    CClientDC dc (this);
    CBrush * brushSR;
    brushSR = new CBrush(RGB(255,0,0));

    dc.FillRect(&editRect,brushSR);

    delete brushSR;
    could anybody give me any guidance.



  2. #2
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: How do I Change the Background Color of an edit box

    the parent of the edit control, dialog or formview need to handle WM_CTLCOLOR

    Sally


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured