Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Change group title text font and color
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change group title text font and color

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


Joined: 02 April 2009
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote nowlex Quote  Post ReplyReply Direct Link To This Post Topic: Change group title text font and color
    Posted: 02 April 2009 at 3:47pm
Does Task Panel work like Windows XP "Windows Security Center" app from MS.  In the main area, you see "Firewall", "Automatic Updates", and "Virus Protection" that you can put controls on the group panel title.

I don''t find a place you can set the font of Group Title text and color. And say, adding another line of text with a different font dynamically on the title.

Please let me know if Xtreme Task Panel can do it, and how.
 
Thanks,

Nowlex
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 20 April 2009 at 3:00pm
We subclassed the task panel and in our constructor we set a custom theme. Our custom theme is subclassed from CXTPTaskPanelExplorerThemePlain. Then we override and implement DrawGroupCaption, DrawCaptionGripper and other methods so we can draw our own colors and use our own font.
 
The base class does have a protected CFont member (m_fntCaption). So if you only want to change the font, you should be able to load your font directly into the CFont object. There are member colors (protected) for groups but I don't see a member color for the text. However when our them draws, we call GetXtremeColor(COLOR_GRAYTEXT). The color can be set using CXTPColorManager::SetColor(COLOR_GRAYTEXT, RGB(myR,myG,myB). However that will affect any text drawing that uses COLOR_GRAYTEXT.
 
You could override the draw routine we did and simply set your font, your color and then call the base class to draw. Then reset the color to the original color so only your task panel text draws with your color.
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.188 seconds.