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

    Question How can i change text background of STATIC?

    Hi all,

    Im trying to change text color and text background of static window, but for now im stuck. Im new in api. I changed static's background by catching WM_CTLCOLORSTATIC message and returning color i want, but text background still remains grey. Any idea how to change it? Thanks in advance.

  2. #2
    Join Date
    Apr 2003
    Posts
    1,755

    Smile

    You have to call SetBkColor.
    Code:
    SetBkColor((HDC)wParam, bkcolor);
    Hope it will help you

  3. #3
    Join Date
    May 2003
    Location
    Canada
    Posts
    7
    Thanks for reply, SetBkColor() works fine. And i found SetTextColor() (I like this naming) so i can change color of my text aswell.

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