This sample program graphically displays the physical size of the printer page, along with the unprintable margin areas and the printable page size. The code demonstrates the use of the GetDeviceCaps API call and using a combobox to allow user-selection of printer.
API DeclarationsGetDeviceCaps