Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Nested Dialog Panes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Nested Dialog Panes

 Post Reply Post Reply
Author
Message
dreamer1977 View Drop Down
Newbie
Newbie


Joined: 29 January 2007
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote dreamer1977 Quote  Post ReplyReply Direct Link To This Post Topic: Nested Dialog Panes
    Posted: 29 January 2007 at 1:14pm

Hello!

Any suggestions...
 
I put two dialog derived panes(MainPaneDialog,AssistantPaneDialog) in the main frame(Hide Client) ,and nest two dialog  derived panes(ChildPaneDialogOne,ChildPaneDialogTwo) in the AssistantPaneDialog(Hide Client).
 
Pic Startup:

Pic AfterResize
 
When the program startup, the child panes' sizes are not properly.(Pic Strartup). After a frame resizing, the child panes' sizes are properly(Pic AfterResize).
 
It's properly that parent(AssistantPaneDialog) dialog template size is smaller than it's pane size. When the child panes show, they use the parent dialog template size.And no further WM_SIZE message is sent to the parent pane to correct it's client size and Reposition Bars.So some parent pane's area is left.

It seems a good way that auto send a proper WM_SIZE to the parent pane just after the program startup.How can I do this?Is it needed to override the OnIdle method?

Apologize for my bad English.

Thanks!

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: 29 January 2007 at 2:43pm
hi,
Just call RepositionBars in the end of OnInitDialog.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dreamer1977 View Drop Down
Newbie
Newbie


Joined: 29 January 2007
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote dreamer1977 Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2007 at 10:35pm


Thank a lot!

You enlighten me, despite it works a bit improperly with my code.
It seems that  the AssistantPaneDialog OnSize(...) cx, cy not match it's size.So after I correct the cx,cy according it's size, the problem disappears.
void AssistantPaneDialog::OnSize(UINT nType, int cx, int cy)
{
 RECT rcWindow;
 GetWindowRect(&rcWindow);
 CDialog::OnSize(nType, rcWindow.right-rcWindow.left,  rcWindow.bottom-rcWindow.top);
 RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, 0, 0,0);
}
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.047 seconds.