visual c++ - dlg.DoModal() is making the dialog box modal to the application and not to the previous dialogue box -


if (idok == dlg.domodal())     {         csfile = dlg.getpathname();         return (lpctstr)csfile;     }     return null; 

i have desktop application , in have dialog box. when click on open button in dialog box open dialog box should pop up. once open dialogue box displayed able again go previous dialogue box , click on open. second instance of open dialog box displayed. can many times. open dialog box modal whole application , not previous dialog box. can me this? per design once open dialog box displayed nothing else should active till closed.

the standard wizard-generated constructor dialog box contains optional constructor-parameter can specify parent window:

class cmyopendialog : public cdialog { // construction public:     cmyopendialog(cwnd* pparent = null);   // standard constructor ... 

when invoke second dialog dialog, supply parent, like

cmyopendialogdlg(this); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -