Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    Thank you for your reply. However, I do not understand your point. To me it seems like you just quoted a (needlessly long) description of the differences between a modal and non-modal dialog. Yes, there are some technical difficulties like A modeless dialog box cannot return a value but that does not necessarily mean that my request is impossible ✱. Maybe I could understand you, if you shortened the quotes to the relevant parts and added more explanations on how you came to your conclusion.
    – Socowi
    Commented Jun 12, 2020 at 8:32
  • ✱ For instance, "you can only set gamma when the app is full screen" and yet DxWnd can force fullscreen-only applications to run in a window. Also, some applications might not use the return value of the modal dialog at all.
    – Socowi
    Commented Jun 12, 2020 at 8:32
  • I'm very well aware that most applications cannot continue to run without the return value from the modal dialog. However, there still could be workarounds for some cases. a) If the return value is not used, create a modeless dialog and return a dummy value. b) If the return value is absolutely required, but the code creating the modal dialog runs in its own thread (which is pretty common for GUIs) then create a modeless dialog and sleep. When the dialog is closed, an interrupt is sent to the sleeping thread and the data from the modeless dialog is returned.
    – Socowi
    Commented Jun 12, 2020 at 20:49
  • The return value is used. That is why the programmer called a modal dialog. All user interface runs on the same thread. So it is not common at all for GUI to have multiple threads. The program isn't sleeping it is waiting on a function return, a different thing altogether.
    – Mark
    Commented Jun 12, 2020 at 20:55