X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a536e411022b21280532c9daadc806a437fbb4c6..b591b7cf2bb27ff38d1dbe6f22496918a9a72a79:/samples/multimon/multimon_test.cpp diff --git a/samples/multimon/multimon_test.cpp b/samples/multimon/multimon_test.cpp index 6d51f3cf88..3ddf4e93b4 100644 --- a/samples/multimon/multimon_test.cpp +++ b/samples/multimon/multimon_test.cpp @@ -5,12 +5,11 @@ // Modified by: // Created: 06/21/02 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team +// Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include -#define wxUSE_DISPLAY 1 #include class TestApp : public wxApp @@ -23,17 +22,33 @@ IMPLEMENT_APP(TestApp) bool TestApp::OnInit() { + bool is_use_display = + #if wxUSE_DISPLAY + true + #else + false + #endif + ; + if( !is_use_display ) + { + wxMessageBox( _T("This sample has to be compiled with wxUSE_DISPLAY"), _T("Building error"), wxOK); + } + #if wxUSE_DISPLAY + else + { size_t count = wxDisplay::GetCount(); - wxLogDebug ( "I detected %i display(s) on your system", count ); + wxLogDebug ( _T("I detected %i display(s) on your system"), count ); size_t i = 0; while ( i < count ) { wxDisplay display ( i ); wxRect r = display.GetGeometry(); - wxLogDebug ( "Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits", + wxLogDebug ( _T("Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits"), i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(), - display.GetDepth() ); + display.GetCurrentMode().GetDepth() ); i++; } - return FALSE; + } + #endif + return false; }