Print Page | Close Window

CXTPButton::GetButtonBackColor doesn't work

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=24069
Printed Date: 27 April 2024 at 5:03pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPButton::GetButtonBackColor doesn't work
Posted By: UglySwede
Subject: CXTPButton::GetButtonBackColor doesn't work
Date 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




Replies:
Posted By: UglySwede
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net