![]() |
Panes Bug (DoModal and top-level windows) |
Post Reply
|
| Author | |
fishy
Newbie
Joined: 26 October 2005 Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Topic: Panes Bug (DoModal and top-level windows)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: 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) ![]() |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
fishy
Newbie
Joined: 26 October 2005 Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
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. 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 |
|
![]() |
|
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 |