Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Customize TaskPanel with a different colors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Customize TaskPanel with a different colors

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

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Topic: Customize TaskPanel with a different colors
    Posted: 10 July 2008 at 2:32am
Hello All,
I want to draw TaskPanel in my project with a different colors. I mean I want for example change color for group headers background, folder background, text color, etc.
Please advice me how can I implement this feature?
Thanks.
"Один законник с портфелем в рукаm
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: 10 July 2008 at 5:24am
Hi,
 
Check source code of Source\TaskPanel\XTPTaskPanelPaintManager.cpp
 
you need create class dervide from one of CXTPTaskPanelPaintManager class override RefreshMetrics and set your colors.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2008 at 5:24am
ok, I created class derived from CXTPTaskPanelPaintManage, override FillTaskPanel method (for example). How can I set now my custom paint manager to my Task panel control?
"Один законник с портфелем в рукаm
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: 11 July 2008 at 5:31am
Hi,
 
m_wndTaskpanel.SetCustomTheme(new CMyPaintManager());
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2008 at 11:04am
Thanks you. This answer was helpful for me. But I have on trouble: once I created CXTPTaskPanelPaintManage object I cant delete it in my destructor.
I mean I create this object on ctor:
m_taskPanelPaintManager = new CTaskPanelPaintManager();
But if I try to free memory in destructor:
if(m_taskPanelPaintManager != NULL)
        delete m_taskPanelPaintManager;
the "Access vialation" exception is appeared.
So, my understanding is that I dont need to free this object manually because it will be released automatically with task panel object. Is it correct?
this is a little example illustrated may trouble with releasing memory after using CXTPTaskPanelPaintManage object  uploads/20080714_110315_PaintManagerTes.zip
"Один законник с портфелем в рукаm
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.063 seconds.