Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPButton::GetButtonBackColor doesn't work
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPButton::GetButtonBackColor doesn't work

 Post Reply Post Reply
Author
Message
UglySwede View Drop Down
Groupie
Groupie


Joined: 27 February 2013
Location: Sweden
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote UglySwede Quote  Post ReplyReply Direct Link To This Post Topic: CXTPButton::GetButtonBackColor doesn't work
    Posted: 24 September 2020 at 1:31pm
Hi!

I want to set the background color for a CXTPButton control, but I can't get it to work. :-(

I override the virtual GetButtonBackColor() and return the COLORREF I want. (Like in http://forum.codejock.com/forum_posts.asp?TID=18969&title=cxtpbutton) But nothing happens. I override GetButtonTextColor() the same way to set the text color, and that works fine. (I'm not using SetTheme. My application uses skins, but it doesn't help if I disable all skinning.)

Any idea what could be wrong? I'd be very grateful for any help! :-) I'm currently using Toolkit Pro 18.6, but will be upgrading to 19.2 soon.

/Anders from Sweden

Back to Top
UglySwede View Drop Down
Groupie
Groupie


Joined: 27 February 2013
Location: Sweden
Status: Offline
Points: 17
Post Options Post Options   Thanks (1) Thanks(1)   Quote UglySwede Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2020 at 10:14am

I found this myself. You have to call SetUseVisualStyle(FALSE) for the button - otherwise GetButtonBackColor() never gets called.

/Anders
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.