In an application, on click of a particular menu option
1. All the dialogs that are opened should be closed
2. There can be n number of dialogs open.
3. The open dialogs may me modal or modless.
How do I programmatically close all the open dialogs without exiting from the application?