Solved

DS_CONTROL

Posted on 1998-02-05
11
575 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 100
if loop in java 3 139
Detect file exist or not 3 154
Problem to App 4 79
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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 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