Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DS_CONTROL

Posted on 1998-02-05
11
Medium Priority
?
605 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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 400 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

824 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