contents up previous next

wxpaintdc

a wxpaintdc must be constructed if an application wishes to paint on the client area of a window from within an onpaint event. this should normally be constructed as a temporary stack object; don't store a wxpaintdc object. if you have an onpaint handler, you must create a wxpaintdc object within it even if you don't actually use it.

using wxpaintdc within onpaint is important because it automatically sets the clipping area to the damaged area of the window. attempts to draw outside this area do not appear.

to draw on a window from outside onpaint, construct a wxclientdc object.

to draw on the whole window including decorations, construct a wxwindowdc object (windows only).

derived from

wxwindowdc
wxdc

include files

<wx/dcclient.h>

see also

wxdc, wxmemorydc, wxpaintdc, wxwindowdc, wxscreendc

members

wxpaintdc::wxpaintdc


wxpaintdc::wxpaintdc

wxpaintdc(wxwindow* window)

constructor. pass a pointer to the window on which you wish to paint.