Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Gradients for color schemes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Gradients for color schemes

 Post Reply Post Reply
Author
Message
GBrookman View Drop Down
Newbie
Newbie
Avatar

Joined: 14 November 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote GBrookman Quote  Post ReplyReply Direct Link To This Post Topic: Gradients for color schemes
    Posted: 14 November 2007 at 4:41pm
We allow users to change color schemes and we want to change some items in our controls to reflect that change. In the attached image the tree node "Application" is painted with a GradientFill using colors XTPColorManager()->grcToolBar.clrDark and
XTPColorManager()->grcToolBar.clrLight
but these don't change on a color scheme change. Is there something I need to do to refresh them? I've tried:
XTPColorManager()->RefreshColors();
following a scheme change, but that didn't help. Is there another source for to-from gradient colors?
 
 
Thanks,
Gary
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 November 2007 at 8:43am
Hi,
 
You can draw selection using current bitmap:
 
CXTPOffice2007Image* pImage = XTPOffice2007Images()->LoadFile(_T("TOOLBARBUTTONS22"));
   if (pImage)
   {
    pImage->DrawImage(pDC, rcItem, pImage->GetSource(3, 4), CRect(8, 8, 8, 8), COLORREF_NULL);
    clrWindow = COLORREF_NULL;
    pDC->SetBkMode(TRANSPARENT);
    clrWindowText = GetXtremeColor(COLOR_WINDOWTEXT);
   }
 
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.047 seconds.