Click to See Complete Forum and Search --> : What is RunModalLoop / EndModalLoop used for??


nglp
April 14th, 1999, 08:38 PM
What is RunModalLoop / EndModalLoop used for and how do you use it??

Gomez Addams
April 14th, 1999, 09:54 PM
RunModalLoop is a non-virtual member function of CWnd.
It is called by the CDialog function DoModal (which is virtual.)
EndModalLoop is called to end the loop. Typically, you will
never have to use them. That is, unless you want to write
your own DoModal. If you want to do idle-time processing in
a dialog write an OnKickIdle handler for WM_KICKIDLE.
Check out the MFC source code in wincore.cpp to see the
implementation of RunModalLoop. It is called from dlgcore.cpp
for CDialog and from dlgprop.cpp for a property sheet.
Do you have a use for these that can't be handled by the
framework as it is ?