Print Page | Close Window

Where are my MDI icons?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11210
Printed Date: 18 May 2024 at 9:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Where are my MDI icons?
Posted By: rdhd
Subject: Where are my MDI icons?
Date 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).



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