]> git.saurik.com Git - wxWidgets.git/blob - samples/multimon/multimon_test.cpp
compilation fix for non-PCH
[wxWidgets.git] / samples / multimon / multimon_test.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: multimon_test.cpp
3 // Purpose: tests wxDisplay class
4 // Author: Royce Mitchell III
5 // Modified by:
6 // Created: 06/21/02
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include <wx/wx.h>
13 #define wxUSE_DISPLAY 1
14 #include <wx/display.h>
15
16 class TestApp : public wxApp
17 {
18 bool OnInit();
19 };
20
21 DECLARE_APP(TestApp)
22 IMPLEMENT_APP(TestApp)
23
24 bool TestApp::OnInit()
25 {
26 size_t count = wxDisplay::GetCount();
27 wxLogDebug ( "I detected %i display(s) on your system", count );
28 size_t i = 0;
29 while ( i < count )
30 {
31 wxDisplay display ( i );
32 wxRect r = display.GetGeometry();
33 wxLogDebug ( "Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits",
34 i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(),
35 display.GetDepth() );
36 i++;
37 }
38 return FALSE;
39 }