DS_CONTROL

Online Help says:

Dialog Properties: More Styles
Control  
Creates a dialog box that works well as a child window of another dialog box, much like a page in a property sheet. This style allows the user to tab among the control windows of a child dialog box, use its accelerator keys, and so on. Type: Bool. Default: False.

This is the complete information i've found about it. I have no idea how it works to display other dialogs as control in a modal dialog box.

a sample program would be fine.
LVL 1
Gus012498Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MikeP090797Commented:
I think this style is for when you display multiple dialogs using CreateDialog.
0
Gus012498Author Commented:
HWND CreateDialog(
    HINSTANCE hInstance,      // handle to application instance
    LPCTSTR lpTemplate,      // identifies dialog box template name  
    HWND hWndParent,      // handle to owner window
    DLGPROC lpDialogFunc       // pointer to dialog box procedure
   );
How can I control the position of the child dialog.
I'd like to use a CDialog class for the child dialog.
0
MikeP090797Commented:
Ok, you can use the CDialog class, call the Create member to create it, and set the position in the OnInitDialog memeber.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Gus012498Author Commented:
Have you got a sample???
0
MikeP090797Commented:
Create a CDialog based dialog for each dialog.
CDlg dlg;
dlg.Create(IDD_DLOG1, hwndParent);

BOOL
CDlg::OnInitDialog()
{
MoveWindow(X1, Y1, X2, Y2);
}
0
Gus012498Author Commented:
Works fine. Exept i can't see any control.
My child dialog contains four static text elements and four ddlboxes.

Create returns TRUE.


0
MikeP090797Commented:
You weren't supposed to see any control. DS_CONTROL is when you create more then one dialog, it will allow you to use tab to switch between them, that's it. the appearence of the dialog doesn't change
0
Gus012498Author Commented:
How can i then display a dialog as a part of a modal dialog?
0
MikeP090797Commented:
The second parameter of the CreateDialog must be the handle of the dialog
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gus012498Author Commented:
Tank you!

Is it also possible to to do this with a CDialog instead of a DlgProc?
0
MikeP090797Commented:
Yes, the second variable of CDialog::Create should be a parent dialog handle
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.