Why can’t I create a “Please wait” dialog from a background thread to inform the user that the main UI thread is busy?
https://devblogs.microsoft.com/oldnewthing/20191023-00/?p=103020 [devblogs.microsoft.com]
2019-10-23 20:46
When the dialog box sets the main UI window as its owner, this causes the input queues to become attached, at which point their fates become linked. In particular, the dialog box cannot show itself because doing so requires it to notify the owner window that the owner has lost activation, but that owner window is not responding to messages because it’s off doing the really long operation.
Specific instance of a more general problem. Doing the wrong thing with the wrong thread leads to sadness.