Print Page | Close Window

TaskPanel: gradient pouring of group header

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11454
Printed Date: 15 September 2025 at 8:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskPanel: gradient pouring of group header
Posted By: debugx
Subject: TaskPanel: gradient pouring of group header
Date Posted: 15 July 2008 at 10:52am
Hello All,
I created a simple SDI application added TaskPanel.
Now I want to fill both background of TaslPanel and Group header rect with gradient.
In regards to the background of TaskPanel I simply override FillTaskPanel function in my custom paint manager and fill it by gradient using my spec function.
But how can I fill group header the such way.
I tryed to override GetGroupColors() but it was not helpfull for me.
How can I resolve this trouble? How can I fill group header rect with two color where one color will be go to the other by gradient?


-------------
"Один законник с портфелем в рукаm



Replies:
Posted By: Oleg
Date Posted: 15 July 2008 at 3:48pm
Him
 
You can try override CXTPTaskPanelPaintManager::DrawGroupCaption


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


Posted By: debugx
Date Posted: 16 July 2008 at 7:48am
I overrided DrawGroupCaption and it was helpful for me. But once I override this method the group icon is not displayed. I can retrive its index:
int CTaskPanelPaintManager::DrawGroupCaption(CDC* pDC, CXTPTaskPanelGroup* pGroup, BOOL bDraw)
{
    //....
    int iconIndex = pGroup->GetIconIndex();
    //HICON groupIcon =
    //pDC->DrawIcon(0, 0, groupIcon);
}
But how can I get the appropriate icon by index.
Thank you


-------------
"Один законник с портфелем в рукаm


Posted By: debugx
Date Posted: 16 July 2008 at 9:12am
I got it:
pGroup->GetTaskPanel()->GetImageManager()->GetIconSet(iconIndex)->GetIcon(16)->Draw(pDC, CPoint(x, y));


-------------
"Один законник с портфелем в рукаm


Posted By: debugx
Date Posted: 16 July 2008 at 9:52am
But how can I force updating group header height? I mean DrawGroupCaption function is called for the header height only one time when application is started. In all other cases this function is called for drawing only (parameter bDraw = true). I need to change group header height dinamically but how can I update this header so that new header was applied?


-------------
"Один законник с портфелем в рукаm



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