Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between CDialog and CDialogEx

What is the difference between CDialog and CDialogEx? I decided to use CDialog because I can't assign m_pMainWnd to Dlg if Dlg is derived from CDialogEx.

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

What kind of problems I might fave by not using CDialogEx like form wizard was offering?

How to assign m_pMainWnd variable derived from CDialogEx?

like image 685
Andrey Zakcharenko Avatar asked Apr 03 '14 13:04

Andrey Zakcharenko


1 Answers

CDialogEX is derived from CDialog, so, setting m_pMainWnd to a CDialogEx derived object should not be a problem. CDialogEx provides the abillity to set the background color or image of the dialog.

like image 113
rrirower Avatar answered Sep 30 '22 15:09

rrirower