Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - GetXtremeColor() never gets initialized
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GetXtremeColor() never gets initialized

 Post Reply Post Reply
Author
Message
TheFlashback View Drop Down
Newbie
Newbie


Joined: 15 October 2005
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TheFlashback Quote  Post ReplyReply Direct Link To This Post Topic: GetXtremeColor() never gets initialized
    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

 

 



Edited by TheFlashback
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
TheFlashback View Drop Down
Newbie
Newbie


Joined: 15 October 2005
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote TheFlashback Quote  Post ReplyReply Direct Link To This Post 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.

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.047 seconds.