Simple question follow up. |
Post Reply |
Author | |
szizza
Newbie Joined: 07 December 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 14 December 2007 at 1:42pm |
I am trying to set the group caption height programattically and can't seem to achieve this. My custom theme class was taken from the CustomSlider example. I've tried setting m_nCaptionHeight in refres metrics, as suggested, and I've had no luck.
CRect rc = pGroup->GetCaptionRect(); is always returning a height of 23 regardless of m_nCaptionHeight. I am getting this rect when DrawGroupCaption is called. Thanks |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, If you set breakpoint in RefreshMetrics do you see m_nCaptionHeight was changed?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
szizza
Newbie Joined: 07 December 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Yes but it is always being set back to 25 - what other functions in the base class modify it?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Show code.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
szizza
Newbie Joined: 07 December 2007 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
void CMACustomSliderTheme::RefreshMetrics() { ...
m_nCaptionHeight = 32;
}
int CMACustomSliderTheme::DrawGroupCaption(CDC* pDC, CXTPTaskPanelGroup* pGroup, BOOL bDraw){ CXTPFontDC fnt(pDC, &m_fntCaption); if (bDraw){ CRect rc = pGroup->GetCaptionRect(); //Height is always 23 if (rc.IsRectEmpty()) return 0; ...
} |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ok, attach whole files, I will test them with our sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |