]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcclient.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / msw / dcclient.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/msw/dcclient.h
2bda0e17
KB
3// Purpose: wxClientDC class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
371a5b4e 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bbcdf8bc
JS
11#ifndef _WX_DCCLIENT_H_
12#define _WX_DCCLIENT_H_
2bda0e17 13
3a5ffa81
VZ
14// ----------------------------------------------------------------------------
15// headers
16// ----------------------------------------------------------------------------
17
2bda0e17 18#include "wx/dc.h"
888dde65
RR
19#include "wx/msw/dc.h"
20#include "wx/dcclient.h"
2bda0e17 21
ddc8faa9 22class wxPaintDCInfo;
3a5ffa81
VZ
23
24// ----------------------------------------------------------------------------
25// DC classes
26// ----------------------------------------------------------------------------
27
53a2db12 28class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxMSWDCImpl
2bda0e17 29{
3a5ffa81 30public:
7ba4fbeb 31 // default ctor
888dde65 32 wxWindowDCImpl( wxDC *owner );
2bda0e17 33
3a5ffa81 34 // Create a DC corresponding to the whole window
888dde65 35 wxWindowDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 36
512cfcc3
PC
37 virtual void DoGetSize(int *width, int *height) const;
38
7ba4fbeb 39protected:
3103e8a9 40 // initialize the newly created DC
7ba4fbeb
VZ
41 void InitDC();
42
888dde65 43 DECLARE_CLASS(wxWindowDCImpl)
c0c133e1 44 wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
2bda0e17
KB
45};
46
53a2db12 47class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
2bda0e17 48{
3a5ffa81 49public:
7ba4fbeb 50 // default ctor
888dde65 51 wxClientDCImpl( wxDC *owner );
2bda0e17 52
3a5ffa81 53 // Create a DC corresponding to the client area of the window
888dde65 54 wxClientDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 55
888dde65 56 virtual ~wxClientDCImpl();
1e6feb95 57
512cfcc3
PC
58 virtual void DoGetSize(int *width, int *height) const;
59
1e6feb95
VZ
60protected:
61 void InitDC();
62
888dde65 63 DECLARE_CLASS(wxClientDCImpl)
c0c133e1 64 wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
2bda0e17
KB
65};
66
53a2db12 67class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
2bda0e17 68{
3a5ffa81 69public:
888dde65 70 wxPaintDCImpl( wxDC *owner );
2bda0e17 71
3a5ffa81 72 // Create a DC corresponding for painting the window in OnPaint()
888dde65 73 wxPaintDCImpl( wxDC *owner, wxWindow *win );
2bda0e17 74
888dde65 75 virtual ~wxPaintDCImpl();
2bda0e17 76
63da7df7
JS
77 // find the entry for this DC in the cache (keyed by the window)
78 static WXHDC FindDCInCache(wxWindow* win);
79
ddc8faa9
VZ
80 // This must be called by the code handling WM_PAINT to remove the DC
81 // cached for this window for the duration of this message processing.
82 static void EndPaint(wxWindow *win);
2bda0e17 83
ddc8faa9
VZ
84protected:
85 // Find the DC for this window in the cache, return NULL if not found.
86 static wxPaintDCInfo *FindInCache(wxWindow* win);
7ba4fbeb 87
888dde65 88 DECLARE_CLASS(wxPaintDCImpl)
c0c133e1 89 wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
2bda0e17
KB
90};
91
c6151f2a
JS
92/*
93 * wxPaintDCEx
94 * This class is used when an application sends an HDC with the WM_PAINT
95 * message. It is used in HandlePaint and need not be used by an application.
96 */
97
53a2db12 98class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC
c6151f2a
JS
99{
100public:
101 wxPaintDCEx(wxWindow *canvas, WXHDC dc);
03647350 102
c6151f2a 103 DECLARE_CLASS(wxPaintDCEx)
c0c133e1 104 wxDECLARE_NO_COPY_CLASS(wxPaintDCEx);
c6151f2a
JS
105};
106
2bda0e17 107#endif
bbcdf8bc 108 // _WX_DCCLIENT_H_