After calling DoModal() on a dialog, and calling a delay function. how do you close the dialog.
m_dlg.DoModal();
Sleep(1000);
.
.
.
After calling DoModal() on a dialog, and calling a delay function. how do you close the dialog.
m_dlg.DoModal();
Sleep(1000);
.
.
.
Modal dialogs are modal in the sense that they are shown when you enter DoModal and hidden when DoModal is left. Your dialog is already closed before you call Sleep(1000);
You should use a non-modal dialog for this purpose.
m_dlg.ShowWindow(SW_SHOW); Sleep(1000); m_dlg.ShowWindow(SW_HIDE);