$szTitle = "wxprinterdc"; include "./_header.inc"; ?>
a printer device context is specific to msw and mac, and allows access to any printer with a windows or macintosh driver. see wxdc for further information on device contexts, and wxdc::getsize for advice on achieving the correct scaling for the page.
derived from
include files
<wx/dcprint.h>
see also
printing framework overview, wxdc
members
wxprinterdc::wxprinterdc
wxprinterdc::getpaperrect
wxprinterdc(const wxprintdata& printdata)
constructor. pass a wxprintdata object with information necessary for setting up a suitable printer device context. this is the recommended way to construct a wxprinterdc. make sure you specify a reference to a wxprintdata object, not a pointer - you may not even get a warning if you pass a pointer instead.
wxprinterdc(const wxstring& driver, const wxstring& device, const wxstring& output, const bool interactive = true, int orientation = wxportrait)
constructor. with empty strings for the first three arguments, the default printer dialog is displayed. device indicates the type of printer and output is an optional file for printing to. the driver parameter is currently unused. use the ok member to test whether the constructor was successful in creating a usable device context.
this constructor is deprecated and retained only for backward compatibility.
wxrect wxprinterdc::getpaperrect()
return the rectangle in device coordinates that corresponds to the full paper area, including the nonprinting regions of the paper. the point (0,0) in device coordinates is the top left corner of the page rectangle, which is the printable area on msw and mac. the coordinates of the top left corner of the paper rectangle will therefore have small negative values, while the bottom right coordinates will be somewhat larger than the values returned by wxdc::getsize.
include "./_footer.inc"; ?>