Solved

DS_CONTROL

Posted on 1998-02-05
11
585 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 111
maxBlock challenge 30 142
matchUp  challenge 6 70
Way to decrease size of apk file 9 88
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 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