![]() |
How to create a second paintmanager instance |
Post Reply
|
| Author | |
andolo
Groupie
Joined: 16 November 2005 Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Topic: How to create a second paintmanager instancePosted: 19 March 2007 at 12:56pm |
|
Hi,
how can i use a second paintmanager in my executable? the code below changes the global painmanager (XTPPaintManager())! how can i avoid this. Thanks in advance. al ----------- begin snippet ----------- m_pPaintManager = new CXTPOffice2007Theme(); HMODULE hModule = LoadLibrary("MyOffice2007Blue.dll"); if(hModule != NULL) ((CXTPOffice2007Theme*)m_pPaintManager)->SetImageHandle(hModule, NULL); ----------- end snippet ----------- |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2007 at 2:27am |
|
Hi,
by default all CXTPOffice2007Theme themes use same XTPOffice2007Images. Do you want one Office2007 use one colors and another - another?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
andolo
Groupie
Joined: 16 November 2005 Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2007 at 4:25am |
|
Yes, i want one global (not necessary but best for me if global) CXTPOffice2007Theme and for some special windows a set of (XTPOffice2007-)Images with colors of our company.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2007 at 6:22am |
|
You can override CXTPOffice2007Theme,
in constructor
m_pImages = new CXTPOffice2007Images();
in destructor
delete m_pImages
and set this new class as paintmanager to individual commandbars
pCommandBars->SetPaintManager(new CMyOffice2007theme());
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
andolo
Groupie
Joined: 16 November 2005 Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2007 at 6:50am |
|
I can't find a member 'CXTPOffice2007Theme::m_pImages'.
The only thing i found id CXTPOffice2007Theme::GetImages() which returns XTPOffice2007Images(), defined as follows: //-------------------------------------------------- CXTPOffice2007Images* AFX_CDECL XTPOffice2007Images() { static CXTPOffice2007Images images; return &images; } //-------------------------------------------------- when i understand right i need a second instance of these static CXTPOffice2007Images images!? |
|
![]() |
|
andolo
Groupie
Joined: 16 November 2005 Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 March 2007 at 10:53am |
|
Sorry!
Found it after update from 10.3 to 10.4 source. Works! Thank you very much. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |