Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to programm nested Dialogs

Status
Not open for further replies.

Legil

Technical User
Jun 21, 2003
2
DE
I have a Dialog and this one can call other Forms the Problem is that in the Main form there is a place reserve so that all other form schould be placed there. So the two Dialogs looks like one.If somme one have a suggestion..:)

LeGil..
 
What you want to use are Child dialogs. For each sub-dialog, change the dialog's style to Child (on the Styles tab of resource editor). Then, on the General tab, set the X and Y offset (in DLU's, of course) to position the sub-dialog on the main dialog.

For example, if your main dialog is called CMainDlg and one of your sub-dialogs is called CSubForm, it might look like this:

[tt]void CMainDlg::OnInitDialog
{
m_wndSubForm.Create(CSubForm::IDD,this);
m_wndSubForm.ShowWindow(SW_HIDE);
}[/tt]

/Then, when you want to display the subform, call m_wndSubForm.ShowWindow(SW_SHOW).

[sub]I REALLY hope that helps.[/sub]
Will
 
thanks for ur help Guy i've just succide it today.

Le Gil

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top