Print Page | Close Window

Colours (Simple Question)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11549
Printed Date: 15 September 2025 at 6:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Colours (Simple Question)
Posted By: Simon HB9DRV
Subject: Colours (Simple Question)
Date Posted: 23 July 2008 at 3:45am
Hi Oleg,
 
When a CXTButton is disabled with EnableWindow(FALSE) how do you compute the colour you draw on the button face? Can I get this colour somehow?
 
This is not important - I would like to get this colour so that I can draw my own controls using the same colour when they are disabled.
 
My controls are at the top and bottom of the attached jpeg.
 


-------------
Simon HB9DRV



Replies:
Posted By: mgampi
Date Posted: 23 July 2008 at 4:58am
Hi Simon;

take a look at Win-API function

HRESULT GetThemeColor(      
    HTHEME hTheme,
    int iPartId,
    int iStateId,
    int iPropId,
    COLORREF *pColor
);



-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: Simon HB9DRV
Date Posted: 23 July 2008 at 5:08am
Originally posted by mgampi mgampi wrote:

Hi Simon;

take a look at Win-API function

HRESULT GetThemeColor(      
    HTHEME hTheme,
    int iPartId,
    int iStateId,
    int iPropId,
    COLORREF *pColor
);

 
Martin - many thanks :-)


-------------
Simon HB9DRV



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