Pregunta

Why second line of code below rises exception

StatusDlg statusDlg (CWnd::GetDesktopWindow());
statusDlg.ShowWindow(SW_SHOW);

and code below goes without problems

StatusDlg * statusDlg = new StatusDlg(NULL);
statusDlg->Create(StatusDlg::IDD,CWnd::GetDesktopWindow());
statusDlg->ShowWindow(SW_SHOW)

?

¿Fue útil?

Solución

Because the first dosen't create the dialog's underlying window?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top