Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPMenuBar::RefreshSysButtons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPMenuBar::RefreshSysButtons

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

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: CXTPMenuBar::RefreshSysButtons
    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.
 
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.109 seconds.