#endif
#ifndef WX_PRECOMP
+ #include "wx/dynarray.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/intl.h"
- #include "wx/dynarray.h"
#include "wx/wxchar.h"
#include "wx/icon.h"
#include "wx/log.h"
#include "wx/filename.h"
#include "wx/module.h"
#include "wx/dynlib.h"
+#include "wx/evtloop.h"
#include "wx/msw/private.h"
#include "wx/msw/ole/oleutils.h"
{
// we should return false only if the app should exit, i.e. only if
// Dispatch() determines that the main event loop should terminate
- return !wxTheApp || wxTheApp->Dispatch();
+ wxEventLoop *evtLoop = wxEventLoop::GetActive();
+ if ( !evtLoop || !evtLoop->Pending() )
+ {
+ // no events means no quit event
+ return true;
+ }
+
+ return evtLoop->Dispatch();
}
wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo()
// fails to find a device.
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
#endif
-
+
wxOleInitialize();
RegisterWindowClasses();
// we're prepared to handle the errors
wxLogNull noLog;
-
+
#if wxUSE_DYNLIB_CLASS
// do we have it?
wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
}
}
}
-#endif
+#endif
}
return s_verComCtl32;
#if WXWIN_COMPATIBILITY_2_4
-#include "wx/evtloop.h"
-
void wxApp::DoMessage(WXMSG *pMsg)
{
wxEventLoop *evtLoop = wxEventLoop::GetActive();