Solved

DS_CONTROL

Posted on 1998-02-05
11
570 Views
Last Modified: 2013-11-19
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.
0
Comment
Question by:Gus012498
  • 6
  • 5
11 Comments
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1315659
I think this style is for when you display multiple dialogs using CreateDialog.
0
 
LVL 1

Author Comment

by:Gus012498
ID: 1315660
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
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1315661
Ok, you can use the CDialog class, call the Create member to create it, and set the position in the OnInitDialog memeber.
0
 
LVL 1

Author Comment

by:Gus012498
ID: 1315662
Have you got a sample???
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1315663
Create a CDialog based dialog for each dialog.
CDlg dlg;
dlg.Create(IDD_DLOG1, hwndParent);

BOOL
CDlg::OnInitDialog()
{
MoveWindow(X1, Y1, X2, Y2);
}
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:Gus012498
ID: 1315664
Works fine. Exept i can't see any control.
My child dialog contains four static text elements and four ddlboxes.

Create returns TRUE.


0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1315665
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
 
LVL 1

Author Comment

by:Gus012498
ID: 1315666
How can i then display a dialog as a part of a modal dialog?
0
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 100 total points
ID: 1315667
The second parameter of the CreateDialog must be the handle of the dialog
0
 
LVL 1

Author Comment

by:Gus012498
ID: 1315668
Tank you!

Is it also possible to to do this with a CDialog instead of a DlgProc?
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1315669
Yes, the second variable of CDialog::Create should be a parent dialog handle
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Installing Microsoft R server on REDHAT or SUSE Linux 4 131
substring method in java 1 98
NotAlone Challenge 20 80
Way to decrease size of apk file 9 45
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now