From 8e0588631370edd48c36cb1b9ef207b27f500f75 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Mar 2016 19:38:05 +0100 Subject: [PATCH] Allow MFC have idle events too in the MFC sample Call MFC base class method from our overridden one. Closes #15252. --- samples/mfc/mfctest.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp index b0b14c38de..9263040ceb 100644 --- a/samples/mfc/mfctest.cpp +++ b/samples/mfc/mfctest.cpp @@ -295,9 +295,14 @@ BOOL CTheApp::PreTranslateMessage(MSG *msg) return CWinApp::PreTranslateMessage(msg); } -BOOL CTheApp::OnIdle(LONG WXUNUSED(lCount)) +BOOL CTheApp::OnIdle(LONG lCount) { - return wxTheApp && wxTheApp->ProcessIdle(); + BOOL moreIdle = CWinApp::OnIdle(lCount); + + if ( wxTheApp && wxTheApp->ProcessIdle() ) + moreIdle = TRUE; + + return moreIdle; } /*********************************************************************