]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxPaintDC}}\label{wxpaintdc} |
2 | ||
3 | A wxPaintDC must be constructed if an application wishes to paint on the | |
4 | client area of a window from within an {\bf OnPaint} event. | |
5 | This should normally be constructed as a temporary stack object; don't store | |
f60d0f94 JS |
6 | a wxPaintDC object. If you have an OnPaint handler, you {\it must} create a wxPaintDC |
7 | object within it even if you don't actually use it. | |
a660d684 | 8 | |
884360bc JS |
9 | Using wxPaintDC within OnPaint is important because it automatically |
10 | sets the clipping area to the damaged area of the window. Attempts to draw | |
11 | outside this area do not appear. | |
12 | ||
a660d684 KB |
13 | To draw on a window from outside {\bf OnPaint}, construct a \helpref{wxClientDC}{wxclientdc} object. |
14 | ||
15 | To draw on the whole window including decorations, construct a \helpref{wxWindowDC}{wxwindowdc} object | |
16 | (Windows only). | |
17 | ||
18 | \wxheading{Derived from} | |
19 | ||
20 | \helpref{wxDC}{wxdc} | |
21 | ||
954b8ae6 JS |
22 | \wxheading{Include files} |
23 | ||
24 | <wx/dcclient.h> | |
25 | ||
a660d684 KB |
26 | \wxheading{See also} |
27 | ||
28 | \helpref{wxDC}{wxdc}, \helpref{wxMemoryDC}{wxmemorydc}, \helpref{wxPaintDC}{wxpaintdc},\rtfsp | |
29 | \helpref{wxWindowDC}{wxwindowdc}, \helpref{wxScreenDC}{wxscreendc} | |
30 | ||
31 | \latexignore{\rtfignore{\wxheading{Members}}} | |
32 | ||
33 | \membersection{wxPaintDC::wxPaintDC} | |
34 | ||
35 | \func{}{wxPaintDC}{\param{wxWindow*}{ window}} | |
36 | ||
37 | Constructor. Pass a pointer to the window on which you wish to paint. | |
38 | ||
39 | ||
40 |