MFC modeless dialog with style child

233 views Asked by At

I have SDI structure program and I want to create CDialog with child style and use CFormView as its parent. Because I want to use CFormView as a "containter".

Now I encounter two problems.

  1. I can not set setmunu to CDialog (because of the dialog style is child)
  2. The dialog behave unnormal (the dialog has CEdit, but it can not input ...)

How can I resolve the problem?

1

There are 1 answers

0
candivan On

I create dialog with style popup , after creation,repoint its parent to cformview and solve the above problems.

void CFuturePCMSView::DialogCreate()
{
    m_pDlgUser = new CDlgUser(this);
    m_pDlgUser->SetParent(this);
    m_pDlgUser->ShowWindow(SW_SHOW);
}