
mdi vs sdi display problems
This is a bit old but I hope it is okay for me to comment anyway. I am
assuming that these instructions are for creating a modeless dialog.
I think that if the dialog is going to be allocated in the constructor and
deleted in the destructor, then it is easier to combine steps 1 to 3 and
just put something such as the following in the CView class:
CDialog m_testdlg;
I have done things like that and it works for me.
Also for modeless dialogs, "you must override" OnOk and OnCancel as
specified in the documentation for CDialog::OnCancel and CDialog::OnOk
respectively.
I have some notes at:
http://www.cpp.atfreeweb.com/ModelessDialogs.html
If anyone has any fixes, suggestions or any other comments about my notes,
let me know.
Quote:
> Refer to the following steps:
> 1) Create a CDialog* variable in CView class named m_testdlg;
> 2) In CView construction method:
> m_testdlg = new CDialog;
> 3) In CView destruction method:
> delete m_testdlg;
> 4) In any other message command handlers that you want to show a dialog:
> m_testdlg.Create( IDD_***, this);
> m_testdlg.ShowWindow(SH_SHOW);