Search Wiki:
These sample programs demonstrate how to print from a native Windows program. is a native Windows program that creates an XPS document and sends it to a printer. In this sample, the print processing is performed in a separate thread so as to not block the user interface.
The purpose of this sample is to illustrate, at a relatively low level, how to implement the printing functions in a native Windows program. While this sample program is written in C++, it does not use object oriented programming techniques. The goal is to illustrate the functions with as little abstraction as possible. Object-oriented programmers can apply the concepts that are illustrated in this sample program to their own object framework. is a native Windows program that uses the GDI Print API to print from the application. It is essentially the same program as described above; however, this program has had the XPS Print API functions replaced by the corresponding functions of the GDI Print API. Wherever possible, new and updated Windows programs should print by using the XPS Print API.
Last edited Sep 24 2010 at 7:08 PM  by ASTDC, version 9
krystyan wrote  Nov 30 2010 at 11:25 PM  
The code compile only if the missing include is commented, also when running it nothing is actualy being printed, instead it produces a xps file? So not sure what this exmaple is meant for. Thanks

Page view tracker