Print Page | Close Window

Nested Dialog Panes

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=6258
Printed Date: 12 November 2025 at 5:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Nested Dialog Panes
Posted By: dreamer1977
Subject: Nested Dialog Panes
Date 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!




Replies:
Posted By: Oleg
Date Posted: 29 January 2007 at 2:43pm
hi,
Just call RepositionBars in the end of OnInitDialog.


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


Posted By: dreamer1977
Date 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);
}



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