In Windows you just create a printer HDC object and draw your output to that instead of to the screen HDC. It's really easy; if you can display on screen, you can print, *and* you can use exactly the same code. It's all done for you within the WinAPI.