X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82ef81ed9c797178d9868823097e272bfddc4c93..169d1d643c0ee0c90fa8e393b5298606bbb68cfd:/src/common/msgout.cpp diff --git a/src/common/msgout.cpp b/src/common/msgout.cpp index 77c19feb6d..f5642aa6c3 100755 --- a/src/common/msgout.cpp +++ b/src/common/msgout.cpp @@ -88,6 +88,26 @@ wxMessageOutput* wxMessageOutput::Set(wxMessageOutput* msgout) return old; } +// ---------------------------------------------------------------------------- +// wxMessageOutputBest +// ---------------------------------------------------------------------------- + +void wxMessageOutputBest::Printf(const wxChar* format, ...) +{ + va_list args; + va_start(args, format); + wxString out; + + out.PrintfV(format, args); + va_end(args); + +#ifdef __WINDOWS__ + ::MessageBox(NULL, out, _T("wxWidgets"), MB_ICONINFORMATION | MB_OK); +#else // !__WINDOWS__ + fprintf(stderr, "%s", (const char*) out.mb_str()); +#endif // __WINDOWS__/!__WINDOWS__ +} + // ---------------------------------------------------------------------------- // wxMessageOutputStderr // ----------------------------------------------------------------------------