X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b20edf8b33e4ffa3a56e65f773e3bf73e13adf81..e960c20e389061c0db09e03fdaf9ffe3a418779b:/samples/multimon/multimon_test.cpp diff --git a/samples/multimon/multimon_test.cpp b/samples/multimon/multimon_test.cpp index 8557897355..2347e7fdb3 100644 --- a/samples/multimon/multimon_test.cpp +++ b/samples/multimon/multimon_test.cpp @@ -22,6 +22,9 @@ IMPLEMENT_APP(TestApp) bool TestApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + bool is_use_display = #if wxUSE_DISPLAY true @@ -36,17 +39,15 @@ bool TestApp::OnInit() #if wxUSE_DISPLAY else { - size_t count = wxDisplay::GetCount(); - wxLogDebug ( _T("I detected %i display(s) on your system"), count ); - size_t i = 0; - while ( i < count ) + unsigned count = wxDisplay::GetCount(); + wxLogDebug ( _T("I detected %u display(s) on your system"), count ); + for (unsigned i = 0; i < count; i++) { wxDisplay display ( i ); wxRect r = display.GetGeometry(); - wxLogDebug ( _T("Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits"), + wxLogDebug ( _T("Display #%u \"%s\" = ( %i, %i, %i, %i ) @ %i bits"), i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(), display.GetCurrentMode().GetDepth() ); - i++; } } #endif