![]() |
Exception in TaskPanel custom theme (XTP 10.2) |
Post Reply
|
| Author | |
VioletRose
Newbie
Joined: 16 June 2005 Location: Israel Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Topic: Exception in TaskPanel custom theme (XTP 10.2)Posted: 27 July 2006 at 2:40pm |
|
I've upgraded my application from XTP 9.60 to 10.20 (XTP 2006 Q2) and now it gets an exception because of the following code (which used to work fine):
Where CCustomTaskPanelTheme is derived from CXTPTaskPanelExplorerTheme
The exception is in file XTPTaskPanelPaintManager.cpp (1157):
I'll appreciate any help.
Irit. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 July 2006 at 6:41pm |
|
Hello,
what inside CCustomTaskPanelTheme?
if you use it in our sample do you see same problme? if you don't use it in your application do you see it?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
VioletRose
Newbie
Joined: 16 June 2005 Location: Israel Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2006 at 5:11am |
|
This is the code (2 functions):
CCustomTaskPanelTheme::CCustomTaskPanelTheme()
{
m_bExplorerTheme = true; m_bBoldCaption = false; m_bOfficeBorder = true; m_clrBackground.SetCustomValue(RGB(255,255,255), RGB(255,255,255); m_bLeftRoundedCorner = true; m_bOfficeHighlight = true; m_groupNormal.clrClient.SetStandardValue(RGB(243, 243, 243)); m_groupNormal.clrHead.SetStandardValue(RGB(224, 223, 227)); m_groupSpecial.clrClient.SetStandardValue(RGB(243, 243, 243)); m_groupSpecial.clrHead.SetCustomValue(RGB(0, 44, 151), RGB(196, 218, 50)); m_groupSpecial.clrHeadTextHot = m_groupSpecial.clrHeadTextNormal; RefreshMetrics(); } void CCustomTaskPanelTheme::RefreshMetrics(){ CreateGripperBitmaps(); } |
|
![]() |
|
VioletRose
Newbie
Joined: 16 June 2005 Location: Israel Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2006 at 5:13am |
|
As to your other 2 questions: I didn't try using this in your application.
If I remove the call then I don't get exception, but the application looks bad (obviously).
Irit.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2006 at 12:48pm |
|
Hi,
Try move code from constructor to refreshmetrics and call base class refreshmetrics:
class CCustomTaskPanelTheme : public CXTPTaskPanelExplorerTheme
{ public: CCustomTaskPanelTheme(); void RefreshMetrics(); }; CCustomTaskPanelTheme::CCustomTaskPanelTheme()
{ }
void CCustomTaskPanelTheme::RefreshMetrics() {
CXTPTaskPanelExplorerTheme::RefreshMetrics(); m_bExplorerTheme = true; m_bBoldCaption = false; m_bOfficeBorder = true; m_clrBackground.SetCustomValue(RGB(255,255,255), RGB(255,255,255)); m_bLeftRoundedCorner = true; m_bOfficeHighlight = true; m_groupNormal.clrClient.SetStandardValue(RGB(243, 243, 243)); m_groupNormal.clrHead.SetStandardValue(RGB(224, 223, 227)); m_groupSpecial.clrClient.SetStandardValue(RGB(243, 243, 243)); m_groupSpecial.clrHead.SetCustomValue(RGB(0, 44, 151), RGB(196, 218, 50)); m_groupSpecial.clrHeadTextHot = m_groupSpecial.clrHeadTextNormal; CreateGripperBitmaps();
} At least this code works with TaskPanel sample...
You never call base RefreshMetrics so caption font was not created...
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
VioletRose
Newbie
Joined: 16 June 2005 Location: Israel Status: Offline Points: 11 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 July 2006 at 6:20am |
|
Thanks, it helped.
Irit.
|
|
![]() |
|
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 |