home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wxos2233.zip
/
wxOS2-2_3_3.zip
/
wxWindows-2.3.3
/
samples
/
multimon
/
multimon_test.cpp
Wrap
C/C++ Source or Header
|
2002-07-19
|
1KB
|
40 lines
/////////////////////////////////////////////////////////////////////////////
// Name: multimon_test.cpp
// Purpose: tests wxDisplay class
// Author: Royce Mitchell III
// Modified by:
// Created: 06/21/02
// RCS-ID: $Id: multimon_test.cpp,v 1.1 2002/07/19 20:42:34 JS Exp $
// Copyright: (c) wxWindows team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include <wx/wx.h>
#define wxUSE_DISPLAY 1
#include <wx/display.h>
class TestApp : public wxApp
{
bool OnInit();
};
DECLARE_APP(TestApp)
IMPLEMENT_APP(TestApp)
bool TestApp::OnInit()
{
size_t count = wxDisplay::GetCount();
wxLogDebug ( "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",
i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(),
display.GetDepth() );
i++;
}
return FALSE;
}