]>
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 | #define INCL_DEV | |
16 | #define INCL_GPI | |
17 | #define INCL_PM | |
18 | #include<os2.h> | |
19 | ||
20 | #include "wx/dcscreen.h" | |
21 | ||
22 | #ifndef WX_PRECOMP | |
23 | #include "wx/string.h" | |
24 | #include "wx/window.h" | |
25 | #endif | |
26 | ||
27 | #include "wx/os2/private.h" | |
28 | ||
29 | IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) | |
30 | ||
31 | // Create a DC representing the whole screen | |
32 | wxScreenDC::wxScreenDC() | |
33 | { | |
34 | m_hDC = ::WinOpenWindowDC(HWND_DESKTOP); | |
35 | m_hPS = ::WinGetScreenPS(HWND_DESKTOP); | |
36 | ::GpiSetBackMix(m_hPS, BM_LEAVEALONE); | |
37 | } // end of wxScreenDC::wxScreenDC() | |
38 | ||
39 | void wxScreenDC::DoGetSize( int* pnWidth, | |
40 | int* pnHeight ) const | |
41 | { | |
42 | // | |
43 | // Skip wxWindowDC version because it doesn't work without a valid m_canvas | |
44 | // (which we don't have) | |
45 | // | |
46 | wxDC::DoGetSize( pnWidth, pnHeight ); | |
47 | ||
48 | } // end of wxScreenDC::DoGetSize |