Print Page | Close Window

One TaskPanelPaintManager for several task panels

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11767
Printed Date: 15 September 2025 at 1:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: One TaskPanelPaintManager for several task panels
Posted By: debugx
Subject: One TaskPanelPaintManager for several task panels
Date Posted: 08 August 2008 at 5:02am
Hello All,
I created a simple SDI application and added several task panels. Then I created my custom task panel paint manager class derived from CXTPTaskPanelPaintManager.
Now I need to set this paint manager to all task panels. But it looks like impossible because once I use this method:
m_myTaskPanelA.SetCustomTheme(m_taskPanelPaintManager);
it releases memore inside. This is a bad decision because if I apply my custom paint manager to other task panel:
m_myTaskPanelB.SetCustomTheme(m_taskPanelPaintManager);
there will be exception because the second task panel will try to release the memory of the paint manager buit first task panel has aslready released it.

Any ideas how can I resolve this trouble? I dont want make a copies of my paint manager.


-------------
"Один законник с портфелем в рукаm



Replies:
Posted By: Oleg
Date Posted: 08 August 2008 at 5:45am
Need to make copy :(
 
m_myTaskPanelA.SetCustomTheme(new CMyTaskPanelPaintManager);
m_myTaskPanelB.SetCustomTheme(new CMyTaskPanelPaintManager);



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net