Solved

DS_CONTROL

Posted on 1998-02-05
11
562 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
Comment Utility
I think this style is for when you display multiple dialogs using CreateDialog.
0
 
LVL 1

Author Comment

by:Gus012498
Comment Utility
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
Comment Utility
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
Comment Utility
Have you got a sample???
0
 
LVL 8

Expert Comment

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

BOOL
CDlg::OnInitDialog()
{
MoveWindow(X1, Y1, X2, Y2);
}
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 1

Author Comment

by:Gus012498
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
The second parameter of the CreateDialog must be the handle of the dialog
0
 
LVL 1

Author Comment

by:Gus012498
Comment Utility
Tank you!

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

Expert Comment

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

10 Experts available now in Live!

Get 1:1 Help Now