May 6th, 1999, 11:22 AM
I have two modal dialog problems which may or may not be related:
Case 1: I have a dialog with an Apply button so that settings changes happen on the main window without dismissing the dialog. However, during the update of the main window it is possible for a modal dialog to be created. When this second dialog is dismissed, the first is no longer modal.
Case 2: I have a worker thread which can cause a modal dialog to be displayed. It does this by posting a message to the main window, and waiting for the main thread to signal the worker thread to continue. In the meantime the main thread displays the modal dialog. However, as for case 1, there may already be a modal dialog on screen when the dialog is displayed on behalf of the worker thread, and the same problems arise.
Any simple code (preferred) or strategies for workarounds would be appreciated.
Derek
Case 1: I have a dialog with an Apply button so that settings changes happen on the main window without dismissing the dialog. However, during the update of the main window it is possible for a modal dialog to be created. When this second dialog is dismissed, the first is no longer modal.
Case 2: I have a worker thread which can cause a modal dialog to be displayed. It does this by posting a message to the main window, and waiting for the main thread to signal the worker thread to continue. In the meantime the main thread displays the modal dialog. However, as for case 1, there may already be a modal dialog on screen when the dialog is displayed on behalf of the worker thread, and the same problems arise.
Any simple code (preferred) or strategies for workarounds would be appreciated.
Derek