title: Is there a way to get a notification when a dialog opens or closes?
body: <p>I have to do modifications to a very old and complex MFC App.</p>
  <p>At the moment there is the need to notify via an external interface when a dialog (no matter modal or nonmodal) is opened or closed and to count the opened dialogs.</p>
  <p>To do this before every <code>DoModal()</code> and <code>Create</code> is no option because there are also DLLs involved that can open dialogs and cannot be changed.</p>
  <p>So is there a way to be notified, if a dialog opens?</p>
  <p>And is there a way to be notified, if a dialog is closed?</p>
  <p>TIA Michael</p>