Print Page | Close Window

GetXtremeColor() never gets initialized

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=3038
Printed Date: 27 July 2025 at 5:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: GetXtremeColor() never gets initialized
Posted By: TheFlashback
Subject: GetXtremeColor() never gets initialized
Date Posted: 15 October 2005 at 3:33am

Hi there.. I am trying your DialogSample project, where in CDialogSampleDlg::OnPaint() call I do the following:

CPaintDC dc(this);

CRect rectClient(0, 0, 0, 0);
GetClientRect(&rectClient);

dc.FillSolidRect(rectC, GetXtremeColor(XPCOLOR_SPLITTER_FACE));

GetXtremeColor() won't work because it does not get initialized. Well, it does in the constructor with the COLORREF_NULL value. Why do i have to do extra steps to initialize the color manager and how I do it at all...

I want the dialog to be light blue.

Cheers,

Serge

 

 




Replies:
Posted By: Oleg
Date Posted: 15 October 2005 at 5:38am

As you can see constructor, it call RefreshColors();
and XPCOLOR_SPLITTER_FACE  become equal to COLOR_3DFACE.

if selected theme is Office 2003 you can use

XTPPaintManager()->GetXtremeColor(XPCOLOR_SPLITTER_FACE) to get Office 2003 variant of XPCOLOR_SPLITTER_FACE.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: TheFlashback
Date Posted: 17 October 2005 at 4:34am

Oh... thanks a bunch.... I did not realize that both PaintManager and ColorManager had two different sets of colors... Is there any reason for having both? Sorry for asking a lot of questions - we've just purchased the tool kit Pro - so I need to get up to speed quickly...

Spasibo.




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