![]() |
Paint UI with mix of themes |
Post Reply
|
| Author | |
CamG
Newbie
Joined: 28 February 2004 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: Paint UI with mix of themesPosted: 02 March 2004 at 7:25pm |
|
I want to have the bulk of my UI rendered with the CXTPOffice2003Theme, but selectively apply custom themes to other items, such as a toolbar here and there. For example, I have an MDI child window with a CXTPToolbar attached which needs to be rendered with my custom theme. In this window's CChildFrame::OnCreate I tried the following, where CMyCustomTheme inherits CXTPOffice2003Theme and does some custom painting: CXTPCommandBars* pCommandBars = CXTPCommandBars::CreateCommandBars(); VERIFY(m_wndToolBar.CreateToolBar(WS_VISIBLE|WS_CHILD|CBRS_T OOLTIPS, this)); It worked, but I get an access violation when I mouse over a control in the toolbar. What's going on here? Is it a good idea to CXTPCommandBars::CreateCommandBars() again after the toolkit has initialized? Is the toolkit capable of supporting this? I'm evaluating the toolkit, so the lack of source code is not helping. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 March 2004 at 12:48pm |
|
try to call pCommadnBars->SetSite(). In next version will appear CXTPCommandBar::SetPaintManager method. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
fredwobus
Newbie
Joined: 02 September 2004 Location: Austria Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 March 2005 at 3:35am |
|
on the subject of CXTPCommandBars::CreateCommandBars
what do you have to call to free the destroy the object that is returned by that call ? I call CXTPCommandBars::CreateCommandBars in my dialogs OnCreate handler, and want to get rid of the allocated memory in its OnDestroy handler. do I just call "delete m_pCommandBars" ? or maybe "m_pCommandBars->InternalRelease()" ? which is correct ? Thanks Fred |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 March 2005 at 5:18am |
|
delete m_pCommandBars
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Russ
Groupie
Joined: 21 September 2003 Location: Russian Federation Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 December 2006 at 9:10am |
|
you cannot use "delete m_pCommandBars"!
|
|
![]() |
|
fredwobus
Newbie
Joined: 02 September 2004 Location: Austria Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 December 2006 at 9:31am |
Why ? |
|
![]() |
|
Russ
Groupie
Joined: 21 September 2003 Location: Russian Federation Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 December 2006 at 12:14am |
|
because it won't compile, destructor is declared as protected
PS: using 9.51 here |
|
![]() |
|
fredwobus
Newbie
Joined: 02 September 2004 Location: Austria Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 December 2006 at 11:59am |
Ahh, well, I use the delete operator in a derived class. It's worked well so far. |
|
![]() |
|
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 |