Print Page | Close Window

Panes Bug (DoModal and top-level windows)

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4145
Printed Date: 10 November 2025 at 10:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Panes Bug (DoModal and top-level windows)
Posted By: fishy
Subject: Panes Bug (DoModal and top-level windows)
Date Posted: 05 May 2006 at 3:54pm
Hello.
I am using version 9.80 and I have experienced a problem with applications using docking panes with multiple top-level windows.

Consider this example:  Two top-level windows exist, window1 and window2.  A modal dialog is displayed whose parent is window1.  A user leaves this modal dialog open and clicks on window2.  (window2 is not affected by the modal loop because it is not a parent of the modal dialog).  The user then tries to 'unpin' one of the docking panes (or any other operation on the panes).  The pane will appear as if the pin is pressed, but will not move.  In fact, the pane will be frozen until the previously created modal dialog is closed.  Once the modal dialog is closed the pane will update properly. 

This behavior is very easy to demonstrate.  Just use the Codejock's VS application wizard to create a multiple top-level windows application.  Create two top-level windows and then click the print button (brings up the modal print dialog).  Now, click on the other top-level window and try to 'unpin' one of the panes - it will be frozen.

Whats the fix?

Source code is attached:
uploads/fishy/2006-05-05_155311_MultiTopTest.zip - 2006-05-05_155311_MultiTopTest.zip

See the screenshots for details:

Step 1: Create two top-level windows:




Step 2: Open the modal print dialog:




Step 3: Try to 'unpin' the other top-level window



Step 4: Drag a window over the existing pane (pane is frozen.. no painting)

uploads/fishy/2006-05-05_155311_MultiTopTest.zip -



Replies:
Posted By: Oleg
Date Posted: 05 May 2006 at 4:32pm

Hello,

Unfortunatelly porblem inside MFC. I don't like the way MFC create MultiFrame windows.

The same problem can be reproduced without Codejcok controls:

create MultiTopFrame application with CEditView view. If you open modal Dialog box in first frame, on second toolbar will not update self.

The reason that MFC font see WM_IDLEUPDATECMDUI message to seconf frame, if first show message box.

Solution:

1. To try to send WM_IDLEUPDATECMDUI  manually

2. Use separate threads for frames as in our MSDI sample (you can try see that it will not have this problem.)

 

 

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: fishy
Date Posted: 05 May 2006 at 5:16pm
Hey Oleg,
Thanks for the response.  I found this gem on the forums:
https://forum.codejock.com/forum_posts.asp?TID=2379 - https://forum.codejock.com/forum_posts.asp?TID=2379 .  Doing what is suggested (timer and sending WM_IDLEUPDATECMDUI manually) seemed to fix it but the solution isn't very elegant.  Do you have any other suggestions on when/how to send WM_IDLEUPDATECMDUI??

- fishy



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