Why is the modal dialog in MFC actually internally modeless?
- by pythiyam
This question arose in my miind after reading this article: http://www.codeproject.com/Articles/3911/The-singular-non-modality-of-MFC-modal-dialogs. He mentions that the modal dialog in MFC is not strictly modal, but implemented as a modeless dialog(internally) with bells and whistles to make it behave as a modal one.
Specifically, he says:
The MFC command routing mechanism uses a combination of message maps
and virtual functions to achieve what it does and a true modal dialog
will totally wreck this mechanism because then the modal message loop
is controlled outside the scope of the MFC command routing machinery
Could anyone elucidate this statement? An example of what would have gone wrong if they had tried to implement a truly modal dialog would greatly clear things up.