Hi all,
Ive created a modeless dialog from my main dialog as follows:
This container dialog creates a child dialog which I show inside the container
From my child dialog I then create a modal dialog when a user clicks on a button
My problem is that the CMyDlg is modal but to the main dialog and not to the container or the child dialog.
Can anyone please advise??
Ive created a modeless dialog from my main dialog as follows:
Code:
m_pContainerDlg = new CDlgContainer(NULL, this);
m_pContainerDlg->Create(CDlgContainer::IDD, GetDesktopWindow());
m_pContainerDlg ->ShowWindow(SW_SHOW);Code:
BOOL CDlgContainer::OnInitDialog()
{
// Create the child dialog and show it
m_pChildDlg = new CChildDlg(this);
m_pChildDlg->Create(IDD_DIRECTORY_DIALOG, this);
return FALSE;
}Code:
CChildDlg:: CChildDlg (CWnd* pParent /*=NULL*/) :
m_pParent((CDlgContainer*)pParent),
{
}
void CChildDlg::OnBnClickedBtn()
{
CMyDlg MyDlg;
INT_PTR iResult = MyDlg.DoModal(pParent);
}Can anyone please advise??