![]() |
Where are my MDI icons? |
Post Reply ![]() |
Author | |
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() 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).
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |