A wxDC is device context onto which graphics and text can be drawn. It is intended to represent a number of output devices in a generic way, so a canvas has a device context and a printer also has a device context. In this way, the same piece of code may write to a number of different devices, if the device context is used as a parameter.
To determine whether a device context is colour or monochrome, test the Colour Bool member variable. To override wxWindows monochrome graphics drawing behaviour, set this member to TRUE.
From version 1.5, this class is abstract and cannot be used to create device context objects. Instead, use the derived classes wxPostScriptDC, wxMetaFileDC, wxMemoryDC or wxPrinterDC (Windows only) for constructing new device contexts. wxCanvasDC is a context that cannot be created by the user but can be retrieved from a wxCanvas by using wxCanvas::GetDC.
When writing code to draw into a device context, use wxDC as a parameter whenever possible, to allow the most general use of your drawing code. You can then pass a device context object of any derived type. See the demo in samples/hello for code which uses this device-independent method of drawing.
Derived types of wxDC have documentation for specific features only, so refer to this section for most device context information.