]> git.saurik.com Git - wxWidgets.git/blame - src/msw/dcscreen.cpp
Solving link problem with 16 bits versions (wxProcessEvent, wxSpinEvent)
[wxWidgets.git] / src / msw / dcscreen.cpp
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcscreen.cpp
3// Purpose: wxScreenDC class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma implementation "dcscreen.h"
14#endif
15
16// For compilers that support precompilation, includes "wx.h".
17#include "wx/wxprec.h"
18
19#ifdef __BORLANDC__
20#pragma hdrstop
21#endif
22
23#ifndef WX_PRECOMP
0c589ad0
BM
24 #include "wx/string.h"
25 #include "wx/window.h"
2bda0e17
KB
26#endif
27
5ea47806
VZ
28#include "wx/msw/private.h"
29
2bda0e17
KB
30#include "wx/dcscreen.h"
31
2bda0e17
KB
32
33#if !USE_SHARED_LIBRARY
34IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
35#endif
36
37// Create a DC representing the whole screen
38wxScreenDC::wxScreenDC(void)
39{
57c208c5 40 m_hDC = (WXHDC) ::GetDC((HWND) NULL);
2bda0e17 41 m_hDCCount ++;
c45a644e
RR
42
43 // the background mode is only used for text background
44 // and is set in DrawText() to OPAQUE as required, other-
45 // wise always TRANSPARENT, RR
46 ::SetBkMode( GetHdc(), TRANSPARENT );
2bda0e17
KB
47}
48
49wxScreenDC::~wxScreenDC(void)
50{
51 SelectOldObjects(m_hDC);
57c208c5 52 ::ReleaseDC((HWND) NULL, (HDC) m_hDC);
2bda0e17
KB
53 m_hDC = 0;
54 m_hDCCount --;
55}
56