X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..55325d01e68cfb071e42699ca72ba84a7071aa2b:/samples/multimon/multimon_test.cpp?ds=sidebyside diff --git a/samples/multimon/multimon_test.cpp b/samples/multimon/multimon_test.cpp index abd36929a7..8557897355 100644 --- a/samples/multimon/multimon_test.cpp +++ b/samples/multimon/multimon_test.cpp @@ -9,12 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include -#include +#include "wx/wx.h" +#include "wx/display.h" class TestApp : public wxApp { - bool OnInit(); + bool OnInit(); }; DECLARE_APP(TestApp) @@ -22,33 +22,33 @@ IMPLEMENT_APP(TestApp) bool TestApp::OnInit() { - bool is_use_display = + bool is_use_display = #if wxUSE_DISPLAY - TRUE + true #else - FALSE + false #endif ; if( !is_use_display ) { wxMessageBox( _T("This sample has to be compiled with wxUSE_DISPLAY"), _T("Building error"), wxOK); } - #if wxUSE_DISPLAY +#if wxUSE_DISPLAY else { - size_t count = wxDisplay::GetCount(); + size_t count = wxDisplay::GetCount(); 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 ( _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() ); - i++; - } + size_t i = 0; + while ( i < count ) + { + wxDisplay display ( i ); + wxRect r = display.GetGeometry(); + 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.GetCurrentMode().GetDepth() ); + i++; + } } - #endif - return FALSE; +#endif + return false; }