Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - TaskPanel: gradient pouring of group header
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel: gradient pouring of group header

 Post Reply Post Reply
Author
Message
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel: gradient pouring of group header
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 July 2008 at 3:48pm
Him
 
You can try override CXTPTaskPanelPaintManager::DrawGroupCaption
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2008 at 9:12am
I got it:
pGroup->GetTaskPanel()->GetImageManager()->GetIconSet(iconIndex)->GetIcon(16)->Draw(pDC, CPoint(x, y));
"Один законник с портфелем в рукаm
Back to Top
debugx View Drop Down
Groupie
Groupie
Avatar

Joined: 23 June 2008
Location: Andorra
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote debugx Quote  Post ReplyReply Direct Link To This Post 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
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.047 seconds.