Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Where are my MDI icons?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Where are my MDI icons?

 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: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Where are my MDI icons?
    Posted: 25 June 2008 at 6:00pm
I have a problem where sometimes the ribbon bar fails to add the MDI icons (minimize/maximize, restore, close). I have traced the issue to CXTPMenuBar::OnHookMessage.
 
In OnHookMessage the code looks for WM_MDICREATE and calls PostMessage(WM_TIMER, TID_REFRESH,0).
 
The problem with the missing icons is that if at anytime during the MDI processing a modal dialog appears, windows will dispatch all the pending messages in the running thread before entering the modal message loop.
 
The result is that the timer message is dispatched and CJ calls GetActiveMdiChildWnd before the MDI window is active and so the CControlMDIButton controls are never created and added to the ribbon.
 
How do I get CJ to add the icons without constantly calling the ribbon RefreshMenu (probably in OnIdle).
 
Perhaps CJ should be making that call to begin with when it does idle processing (like when it does command update UI handling).
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.141 seconds.