Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Resizing of inner-dialog of a dialog box Collapse All
Subject Author Date
jb lee May 1, 2006 - 1:53 PM

I made two resizable dialogs.
One is for main, the other is for reside in the main dialog(like your ProfUIS Control sample application).
Main dialog has a group-box which is used for position and sizing of the child dialog.
When I resize main dialog, child dialog remain it’s original position and size.
Both of are derived from CExtResizableDialog and anchored at OnInitDialog().
Do I need some other work to do it?

Technical Support May 2, 2006 - 11:04 AM

Initially you should use the group box control to position your child dialog(s) by invoking the MoveWindow() API. Then just anchor the child dialog inside the main dialog:

CExtResizableDialog * pMainDialog = . . .
CWnd * pGroupBox = . . . // something like pMainDialog->GetDlgItem( ID_MY_GROUP_BOX )
CExtResizableDialog * pChildDialog = . . .
CRect rc;
    pGroupBox->GetWindowRect( &rc );
    pMainDialog->ScreenToClient( &rc );
    pChildDialog->MoveWindow( &rc );
    pMainDialog->AddAnchor( pChildDialog->m_hWnd, __RDA_LT, __RDA_RB );

jb lee May 2, 2006 - 8:54 PM

Thanks, I omitted the last line.