X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3135f4a7785f188af291c35ce5df6bdd13672300..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/msw/app.cpp?ds=sidebyside diff --git a/src/msw/app.cpp b/src/msw/app.cpp index a03d31788a..a184037d67 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -226,6 +226,8 @@ bool wxApp::Initialize() g_globalCursor = new wxCursor; + // VZ: these icons are not in wx.rc anyhow (but should they?)! +#if 0 wxSTD_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_FRAME")); wxSTD_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDIPARENTFRAME")); wxSTD_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDICHILDFRAME")); @@ -233,6 +235,7 @@ bool wxApp::Initialize() wxDEFAULT_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_FRAME")); wxDEFAULT_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDIPARENTFRAME")); wxDEFAULT_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDICHILDFRAME")); +#endif // 0 RegisterWindowClasses(); @@ -620,7 +623,6 @@ int wxEntry(WXHINSTANCE hInstance, #else #undef CATCH_PROGRAM_EXCEPTIONS #endif - wxhInstance = (HINSTANCE) hInstance; if (!wxApp::Initialize()) @@ -648,6 +650,13 @@ int wxEntry(WXHINSTANCE hInstance, // but this call is provided for compatibility across platforms. wxTheApp->OnInitGui(); + // We really don't want timestamps by default, because it means + // we can't simply double-click on the error message and get to that + // line in the source. So VC++ at least, let's have a sensible default. +#ifdef __VISUALC__ + wxLog::SetTimestamp(NULL); +#endif + int retValue = 0; if ( wxTheApp->OnInit() ) @@ -1159,6 +1168,24 @@ bool wxYield() return TRUE; } +//----------------------------------------------------------------------------- +// wxWakeUpIdle +//----------------------------------------------------------------------------- + +void wxWakeUpIdle() +{ + // Send the top window a dummy message so idle handler processing will + // start up again. Doing it this way ensures that the idle handler + // wakes up in the right thread. + wxWindow *topWindow = wxTheApp->GetTopWindow(); + if ( topWindow ) { + HWND hWnd = (HWND)topWindow->GetHWND(); + ::PostMessage(hWnd, WM_NULL, 0, 0); + } +} + +//----------------------------------------------------------------------------- + wxIcon wxApp::GetStdIcon(int which) const {