Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - One TaskPanelPaintManager for several task panels
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

One TaskPanelPaintManager for several task panels

 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: One TaskPanelPaintManager for several task panels
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.156 seconds.