Print Page | Close Window

Getting Theme Gradiant Colors

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=10176
Printed Date: 06 October 2024 at 2:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Getting Theme Gradiant Colors
Posted By: dedvalson
Subject: Getting Theme Gradiant Colors
Date Posted: 10 April 2008 at 2:05pm
Hi,
 
I am moving an existing MFC app to XTP and I have run into one issue I haven't seen addressed in the samples.
 
I have windows that I draw and manage myself that I wish to have the same gradient that is used on command bars on.
 
Thus I would like to get access to the colors used to draw the gradiants on the command bars, or better yet a function that will just draw that background for me.
 
I saw the various Fill methods in the CXTPPaintManager, but I need one that I can hand a basic CWnd to. Or I need to get the colors to draw it myself, but those colors need to change when the theme changes.
 
Any suggestions??
 
 



Replies:
Posted By: Oleg
Date Posted: 11 April 2008 at 1:07am
Hi,
 
Get color using
 
CXTPPaintManagerColorGradient& clr = ((CXTPOffice2003Theme*)XTPPaintManager())->m_clrCommandBar;
 
fill with
 
XTPDrawHelpers()->GradientFill(pDC, rcFill, clr, TRUE);


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



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