![]() |
Nested Dialog Panes |
Post Reply
|
| Author | |
dreamer1977
Newbie
Joined: 29 January 2007 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Nested Dialog PanesPosted: 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! |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2007 at 2:43pm |
|
hi,
Just call RepositionBars in the end of OnInitDialog.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
dreamer1977
Newbie
Joined: 29 January 2007 Location: United States Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 January 2007 at 10:35pm |
|
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); } |
|
![]() |
|
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 |