質問

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)

?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top