]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/dcmemory.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / msw / dcmemory.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
7ba4fbeb 2// Name: wx/msw/dcmemory.h
2bda0e17
KB
3// Purpose: wxMemoryDC class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bbcdf8bc
JS
11#ifndef _WX_DCMEMORY_H_
12#define _WX_DCMEMORY_H_
2bda0e17 13
888dde65
RR
14#include "wx/dcmemory.h"
15#include "wx/msw/dc.h"
2bda0e17 16
53a2db12 17class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxMSWDCImpl
2bda0e17 18{
72cdf4c9 19public:
888dde65
RR
20 wxMemoryDCImpl( wxMemoryDC *owner );
21 wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
22 wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); // Create compatible DC
2bda0e17 23
7ba4fbeb
VZ
24 // override some base class virtuals
25 virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
72cdf4c9 26 virtual void DoGetSize(int* width, int* height) const;
fea35690 27 virtual void DoSelect(const wxBitmap& bitmap);
72cdf4c9 28
03647350 29 virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const
18f2ae49
KO
30 { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC() );}
31
512cfcc3 32protected:
7ba4fbeb
VZ
33 // create DC compatible with the given one or screen if dc == NULL
34 bool CreateCompatible(wxDC *dc);
35
36 // initialize the newly created DC
37 void Init();
38
888dde65 39 DECLARE_CLASS(wxMemoryDCImpl)
c0c133e1 40 wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
2bda0e17
KB
41};
42
43#endif
bbcdf8bc 44 // _WX_DCMEMORY_H_