Print Page | Close Window

CXTPMenuBar::RefreshSysButtons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=16571
Printed Date: 16 November 2024 at 10:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPMenuBar::RefreshSysButtons
Posted By: rdhd
Subject: CXTPMenuBar::RefreshSysButtons
Date Posted: 09 April 2010 at 4:47pm
After building the app's ribbon bar, I search the controls for XTP_ID_MENU_CLOSE and set the xtpFlagManualUpdate so I can enable/disable the ability to close the document's window (in an mdi app).
 
When we restore down and then (re) maximize our MDI window, CJ is recreating the system controls for the window in RefreshSysButtons. This occurs when the timer ID is TID_REFRESH. The fact that the original control had the manual update flag is lost.
 
I need to set the xtpFlagManualUpdate on the close control, which was set on the control that existed before I hit the restore (down) control. I have handled the SC_MAXIMIZE system command but after processing it, CJ has yet to recreate the controls because a timer is involved (TID_REFRESH). I have subclassed the ribbon bar but the only virtual method involved in this scenario is the mfc OnTimer method.
 
Without the manual update flag, we are no longer given the chance to disable the control.
 
Is there something occurring I am unaware of that would allow me to robustly address this issue? The TID_REFRESH definition is not public (just defined locally in XTPMenuBar.cpp) and I want to avoid copying that definition to restore the control to its proper state since CJ can change its value at will.
 



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