CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Button Text Color

    I want to change the text color of buttons on the fly, but I don't want to use the owner draw option. I've tried the WM_CTLCOLOR message and I can change the text color of every other control except for the button. There has to be a simple way somewhere, right?


  2. #2
    Join Date
    Jun 1999
    Location
    Germany
    Posts
    343

    Re: Button Text Color

    Sorry, but if you want to do that, you must
    derive a class from CButton and react on WM_PAINT.

    That's why the ButtonText has its color from the system settings -> If you change this color all buttons will get the new textcolor ( see SetSysColor, GetSysColor)



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