Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Trouble with changing margins in TaskPanel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Trouble with changing margins in TaskPanel

 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: Trouble with changing margins in TaskPanel
    Posted: 06 August 2008 at 2:46am
Hello All,

I have simple SDI application with Task Panel control on it. I set my custom paint manager and overrode GetControlMargins method for controlling task panel margins. It works ok but one moment. Once I change margin parameters from other dialog and send appropriate message to my main view the task panel appearance is not changed. My main view received the respective message but task panel margins are not changed on the fly. When I leave this dialog and return to the main view and resize it the task panel margins are changed as well. Where I am wrong? How should I invalidate my task panel from other dialog to change its margins.
this->Invalidate() does not help.

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: 07 August 2008 at 3:52am
I just need to know what does call method GetControlMargins() in task panel paint manager and how can I force calling this method manually?
"Один законник с портфелем в рука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: 08 August 2008 at 4:16am
I found out how to force recalculation of all respective metrix in the task panel for the first group:
void CMyAppView::RecalculateTaslPanelMetrix(CXTPTaskPanel* wndTaskPanel)
{
    CXTPTaskPanelGroup* welcomeGroup = wndTaskPanel->GetAt(0);
    if(welcomeGroup != NULL)
        welcomeGroup->SetExpanded(welcomeGroup->IsExpanded());
}
In this case all margins and other control length will be updated.
But this way is obviously ugly.
Are there any ways?
"Один законник с портфелем в рука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: 08 August 2008 at 5:46am
Hi,
 
use Reposition method.
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.031 seconds.