Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Simple question follow up.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Simple question follow up.

 Post Reply Post Reply
Author
Message
szizza View Drop Down
Newbie
Newbie


Joined: 07 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote szizza Quote  Post ReplyReply Direct Link To This Post Topic: Simple question follow up.
    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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
szizza View Drop Down
Newbie
Newbie


Joined: 07 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote szizza Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2007 at 12:17pm
Show code.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
szizza View Drop Down
Newbie
Newbie


Joined: 07 December 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote szizza Quote  Post ReplyReply Direct Link To This Post 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;
    ...
}
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2007 at 11:54am
ok, attach whole files, I will test them with our sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.