Launching another dialog box in a dialog box class
-
hi, I have tried to implement a error prompt dialog box which pops up when I execute some calculations in a dialog box. I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again. What should be a good way to have a dialog box to receive the data? By Modal dialog instead? How do I actually do that inside a dialog class calling another dialog class? :~
-
hi, I have tried to implement a error prompt dialog box which pops up when I execute some calculations in a dialog box. I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again. What should be a good way to have a dialog box to receive the data? By Modal dialog instead? How do I actually do that inside a dialog class calling another dialog class? :~
oRion wrote: I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again Modeless dialog lives it's own life after it's created, handling window messages sended to him. oRion wrote: What should be a good way to have a dialog box to receive the data? By Modal dialog instead? Yes. oRion wrote: How do I actually do that inside a dialog class calling another dialog class? There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Pavel Sonork 100.15206
-
oRion wrote: I have tried to use modaless dialog but the program don't seems to stop for the corrected data from the Error Window to return before continuing the routine again Modeless dialog lives it's own life after it's created, handling window messages sended to him. oRion wrote: What should be a good way to have a dialog box to receive the data? By Modal dialog instead? Yes. oRion wrote: How do I actually do that inside a dialog class calling another dialog class? There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Pavel Sonork 100.15206
oRion wrote: How do I actually do that inside a dialog class calling another dialog class? Pavel wrote: There is nothing special with it - DialogBox API function or CDialog::DoModal(), if you are using MFC, executes a modal dialog. You need to set the modal dialog parent to the dialog you are executing it from. They return IDOK, if the modal dialog was closed with OK. Thanks for the reply. : ) I am not too sure where to set the modal dialog parent to the dialog? How to reference or get a handle in the parent dialog? :confused: