Print Page | Close Window

Simple question follow up.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=9110
Printed Date: 21 November 2024 at 5:59pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Simple question follow up.
Posted By: szizza
Subject: Simple question follow up.
Date 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




Replies:
Posted By: Oleg
Date Posted: 14 December 2007 at 2:59pm

Hi,

If you set breakpoint in RefreshMetrics do you see m_nCaptionHeight  was changed?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: szizza
Date Posted: 14 December 2007 at 7:09pm
Yes but it is always being set back to 25 - what other functions in the base class modify it?


Posted By: Oleg
Date Posted: 15 December 2007 at 12:17pm
Show code.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: szizza
Date Posted: 15 December 2007 at 2:24pm

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;
    ...
}


Posted By: Oleg
Date Posted: 16 December 2007 at 11:54am
ok, attach whole files, I will test them with our sample.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net