]>
git.saurik.com Git - wxWidgets.git/blob - samples/multimon/multimon_test.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: multimon_test.cpp
3 // Purpose: tests wxDisplay class
4 // Author: Royce Mitchell III
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #include "wx/display.h"
15 class TestApp
: public wxApp
21 IMPLEMENT_APP(TestApp
)
23 bool TestApp::OnInit()
34 wxMessageBox( _T("This sample has to be compiled with wxUSE_DISPLAY"), _T("Building error"), wxOK
);
39 unsigned count
= wxDisplay::GetCount();
40 wxLogDebug ( _T("I detected %u display(s) on your system"), count
);
41 for (unsigned i
= 0; i
< count
; i
++)
43 wxDisplay
display ( i
);
44 wxRect r
= display
.GetGeometry();
45 wxLogDebug ( _T("Display #%u \"%s\" = ( %i, %i, %i, %i ) @ %i bits"),
46 i
, display
.GetName().c_str(), r
.GetLeft(), r
.GetTop(), r
.GetWidth(), r
.GetHeight(),
47 display
.GetCurrentMode().GetDepth() );