X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ca375c5620209d77a88d2d378bdcdedbc82e7e..c944775f72435d2c0493113e05445898ab8baf1b:/src/msw/app.cpp?ds=sidebyside diff --git a/src/msw/app.cpp b/src/msw/app.cpp index beecee9e62..537b447d18 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -40,7 +40,7 @@ #include "wx/dialog.h" #include "wx/msgdlg.h" #include "wx/intl.h" - #include "wx/wxchar.h" + #include "wx/crt.h" #include "wx/log.h" #include "wx/module.h" #endif @@ -213,7 +213,7 @@ bool wxGUIAppTraits::DoMessageFromThreadWait() { // we should return false only if the app should exit, i.e. only if // Dispatch() determines that the main event loop should terminate - wxEventLoop *evtLoop = wxEventLoop::GetActive(); + wxEventLoopBase * const evtLoop = wxEventLoop::GetActive(); if ( !evtLoop || !evtLoop->Pending() ) { // no events means no quit event @@ -266,11 +266,19 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const #endif } -wxTimerImpl * -wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) +#if wxUSE_TIMER + +wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) { - return new wxMSWTimerImpl(timer); -}; + return new wxMSWTimerImpl(timer); +} + +#endif // wxUSE_TIMER + +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop; +} // =========================================================================== // wxApp implementation @@ -316,9 +324,9 @@ bool wxApp::Initialize(int& argc, wxChar **argv) #ifdef __WXWINCE__ wxString tmp = GetAppName(); tmp += wxT("ClassName"); - wxCanvasClassName = wxStrdup( tmp.c_str() ); + wxCanvasClassName = wxStrdup( tmp.wc_str() ); tmp += wxT("NR"); - wxCanvasClassNameNR = wxStrdup( tmp.c_str() ); + wxCanvasClassNameNR = wxStrdup( tmp.wc_str() ); HWND hWnd = FindWindow( wxCanvasClassNameNR, NULL ); if (hWnd) { @@ -544,10 +552,8 @@ wxApp::~wxApp() // wxApp idle handling // ---------------------------------------------------------------------------- -void wxApp::OnIdle(wxIdleEvent& event) +void wxApp::OnIdle(wxIdleEvent& WXUNUSED(event)) { - wxAppBase::OnIdle(event); - #if wxUSE_DC_CACHEING // automated DC cache management: clear the cached DCs and bitmap // if it's likely that the app has finished with them, that is, we