Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTTreeCtrl : color of the focused text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTTreeCtrl : color of the focused text

 Post Reply Post Reply
Author
Message
gwoin View Drop Down
Groupie
Groupie
Avatar

Joined: 09 September 2004
Location: France
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote gwoin Quote  Post ReplyReply Direct Link To This Post Topic: CXTTreeCtrl : color of the focused text
    Posted: 05 January 2007 at 5:06am

Hi,

In a CXTTreeCtrl control, how to change the color of the focused text (the color when the mouse is over the item)?
For now it is a blue (0,0,255).
 
To change the color of the text, it's easy ( SetTexColor(COLORREF); ).
But I cannot find any function to change the color of the focused text.
If it's in the ini file of my skin, I cannot find where...
 
Any idea?
 
Thank you.
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 6:26am
Try the overrides CXTPTreeCtrl GetItemColor and GetItemBackColor.
 
Alternatively, I had to override the DoPaint function so I could have a better selected item when the tree doesnt have the focus (so you can actually see it, as per DevStudio) so you may have to do a similar thing.
Back to Top
gwoin View Drop Down
Groupie
Groupie
Avatar

Joined: 09 September 2004
Location: France
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote gwoin Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 8:44am
Hi,
Thank you,
I will try, but I will certainly have to repaint everything, no?
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 9:45am

Not with the overrides, its asking you for the colour when it needs to paint.

Back to Top
gwoin View Drop Down
Groupie
Groupie
Avatar

Joined: 09 September 2004
Location: France
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote gwoin Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2007 at 10:01am
Ok, thanks,
I'll try to override.
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.