Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Pane in child frame not updated
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pane in child frame not updated

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: Pane in child frame not updated
    Posted: 19 January 2008 at 7:28pm
When I change ribbon style (aqua, black etc), I update the main frame as shown in the MDI Ribbon sample. However, my panes in my child frames are not updated. I understand the reason for this, but I want to solve this elegantly. Please help me out!
 
I have this in CMainFrame:
ON_COMMAND_RANGE(ID_OPTIONS_STYLEBLUE, ID_OPTIONS_STYLEAQUA, OnOptionsStyle)
 
I thought this would update the pane in my child frame, but it does not:
 
CWnd *pWnd = CWnd::FromHandle(m_hWndMDIClient)->GetWindow(GW_CHILD);
while (pWnd)
{
    pWnd->RedrawWindow(0, 0, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN);
    pWnd = pWnd->GetWindow(GW_HWNDNEXT);
}
 
Q: How do I explicitly tell my child frame to tell the pane manager to update its metrics?
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: 21 January 2008 at 2:16am
Him
 
You must call RefreshMetrics:
 
m_paneManager.GetPaintManager()->RefreshMetrics();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2008 at 2:43am
Yes, I know that. The question is; how do I tell all my child frames to make that call (I have pane managers in other frames than main)?
 
My current solution is to send a user-defined message, UWM_REFRESHMETRICS, which I send to all child frames. However, I do not like that solution. Isn't there built-in support for this? Some WM_XTP-message perhaps?
 
Thanks for your response!
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.172 seconds.