Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - (SOLVED) HOWTO: CXTPTabControl Hilite current tab
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

(SOLVED) HOWTO: CXTPTabControl Hilite current tab

 Post Reply Post Reply
Author
Message
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Topic: (SOLVED) HOWTO: CXTPTabControl Hilite current tab
    Posted: 03 April 2017 at 12:06pm
Hi;

I have two CXTPTabControl instances within one dialog. I want the focused control to be "more visible"; therefore I want the focused tab control to colorize its currently focused tab only. When the focus changed to the second instance, the first should remove coloring and the second one colorizes its active tab.
Drawing the focus rectangle on the active tab of the focused instance isn't enough due to bad visibility.

Can this be done with the currently available feature set?
How?
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 266
Post Options Post Options   Thanks (1) Thanks(1)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2017 at 5:39am
Hi!
You could use your own colorset.
I'm not sure if this will work with CXTPTabControl too.
m_wndMDITabWindow.GetPaintManager()->SetColorSet(new CXTPTabColorSetOffice2013Custom());

class CXTPTabColorSetOffice2013Custom: public CXTPTabColorSetOffice2013 { public: CXTPTabColorSetOffice2013Custom() { } //----------------------------------------------------------------------- virtual COLORREF GetItemColor(CXTPTabManagerItem* pItem) //----------------------------------------------------------------------- { COLORREF clrItem;

if (pItem->IsHighlighted())
{ clrItem = m_clrButtonHighlighted; }
return clrItem; }
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2017 at 5:48am
Thanks!

I'll give it a try...
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2017 at 8:34am
Thanks, it works!
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
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.125 seconds.