Print Page | Close Window

Pane in child frame not updated

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9359
Printed Date: 14 May 2024 at 11:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane in child frame not updated
Posted By: znakeeye
Subject: Pane in child frame not updated
Date 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?



Replies:
Posted By: Oleg
Date Posted: 21 January 2008 at 2:16am
Him
 
You must call RefreshMetrics:
 
m_paneManager.GetPaintManager()->RefreshMetrics();


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date 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!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net