Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Getting Theme Gradiant Colors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting Theme Gradiant Colors

 Post Reply Post Reply
Author
Message
dedvalson View Drop Down
Groupie
Groupie


Joined: 10 April 2008
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote dedvalson Quote  Post ReplyReply Direct Link To This Post Topic: Getting Theme Gradiant Colors
    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??
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.141 seconds.