Pane in child frame not updated |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
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?
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Him
You must call RefreshMetrics:
m_paneManager.GetPaintManager()->RefreshMetrics();
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
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!
|
|
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 |