Just a simple question..A dialog based MFC application does not seem to handle OnIde() processing even if you override OnIdle(). But a SDI or MDI app does. Why is this so? Thanks in advance..
It is by design of MFC: CWinApp::OnIdle and CWinApp::Run are called only after the CWinApp::InitInstance returns TRUE. But in a dialog based App InitInstance returns after the dialog exits, so it doesn't make any sense call Run nor OnIdle.
Instead the dialog uses its own message loop (but without OnIdle). You can, however, implement you own "idle" processing using WM_KICKIDLE (or/and WM_IDLEUPDATECMDUI) message. See http://msdn.microsoft.com/en-us/magazine/cc301466.aspx http://www.microsoft.com/msj/0797/c0797.aspx
Another approach could be to use the dialog modeless instead of running DoModal. This way the dialog becomes main window, with OnIdle available in application class. The attached sample provides minimal framework needed for such an app proper functioning.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.