CreatePrinterDC initializes the device context that you simply pass in by reference, so you can use it to print. There's two normal varieties of threads that CWinThread supports: worker threads and consumer-interface threads. Worker threads don't have any concept pump: by way of example, a thread that performs history calculations https://cwin.pet/