Why is the modal dialog in MFC actually internally modeless?

Posted by pythiyam on Stack Overflow See other posts from Stack Overflow or by pythiyam
Published on 2012-09-06T09:32:19Z Indexed on 2012/09/06 9:38 UTC
Read the original article Hit count: 311

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-c++