The difference between CDialog and CDialogEx

What is the difference between CDialog and CDialogEx? I decided to use CDialog because I cannot assign m_pMainWnd to Dlg if Dlg is obtained from CDialogEx.

BOOL CPreparationApp::InitInstance()
{
    MyClass2 Dlg; //derived from CDialog 
    m_pMainWnd = &Dlg;
    Dlg.DoModal();
    return TRUE;
}

What problems could I use if I did not use CDialogEx, for example, a form wizard?

How to assign m_pMainWnd variable obtained from CDialogEx?

+4
source share
3 answers

CDialogEX is obtained from CDialog, so setting m_pMainWnd to an object created on CDialogEx should not be a problem. CDialogEx provides the ability to set the background color or image of the dialog box.

+4
source

CDialogEX , . , CDialogEX, , CDialaogEX, , , CreateEX. CDilaogEX CDialog, .

+4

, , MFC CDialog CDialogEx:

CMFCMenuButton

, , !

0

Source: https://habr.com/ru/post/1534838/


All Articles