Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Panes Bug (DoModal and top-level windows)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Panes Bug (DoModal and top-level windows)

 Post Reply Post Reply
Author
Message
fishy View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2005
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote fishy Quote  Post ReplyReply Direct Link To This Post 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)


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
fishy View Drop Down
Newbie
Newbie
Avatar

Joined: 26 October 2005
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote fishy Quote  Post ReplyReply Direct Link To This Post 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
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.063 seconds.