![]() |
TaskPanel: gradient pouring of group header |
Post Reply
|
| Author | |
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Topic: TaskPanel: gradient pouring of group headerPosted: 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
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 July 2008 at 3:48pm |
|
Him
You can try override CXTPTaskPanelPaintManager::DrawGroupCaption
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 July 2008 at 9:12am |
|
I got it:
pGroup->GetTaskPanel()->GetImageManager()->GetIconSet(iconIndex)->GetIcon(16)->Draw(pDC, CPoint(x, y)); |
|
|
"Один законник с портфелем в рукаm
|
|
![]() |
|
debugx
Groupie
Joined: 23 June 2008 Location: Andorra Status: Offline Points: 28 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
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 |