]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: src/os2/dcscreen.cpp | |
3 | // Purpose: wxScreenDC class | |
4 | // Author: David Webster | |
5 | // Modified by: | |
6 | // Created: 10/14/99 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) David Webster | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // For compilers that support precompilation, includes "wx.h". | |
13 | #include "wx/wxprec.h" | |
14 | ||
15 | #include "wx/os2/dcscreen.h" | |
16 | ||
17 | #ifndef WX_PRECOMP | |
18 | #include "wx/string.h" | |
19 | #include "wx/window.h" | |
20 | #endif | |
21 | ||
22 | #include "wx/os2/private.h" | |
23 | ||
24 | IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxPMDCImpl) | |
25 | ||
26 | // Create a DC representing the whole screen | |
27 | wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) : | |
28 | wxPMDCImpl( owner ) | |
29 | { | |
30 | m_hDC = ::WinOpenWindowDC(HWND_DESKTOP); | |
31 | m_hPS = ::WinGetScreenPS(HWND_DESKTOP); | |
32 | ::GpiSetBackMix(m_hPS, BM_LEAVEALONE); | |
33 | } // end of wxScreenDC::wxScreenDC() | |
34 | ||
35 | void wxScreenDCImpl::DoGetSize( int* pnWidth, | |
36 | int* pnHeight ) const | |
37 | { | |
38 | // | |
39 | // Skip wxWindowDC version because it doesn't work without a valid m_canvas | |
40 | // (which we don't have) | |
41 | // | |
42 | wxPMDCImpl::DoGetSize( pnWidth, pnHeight ); | |
43 | ||
44 | } // end of wxScreenDC::DoGetSize |