I am working on a c++ browser app which will render html on the app screen. I wanna to print the entire contents of the app screen (as internet explorers do). What is the proper, and easiest, way where I only pass handle to app window and it do print/pdf.
I googled this question but found only manual drawing. Is there some lib/technique where i pass handler of current window & it take care of printing text & images.
Windows provides the function
PrintWindowfor getting an image of a window. Here is an example, taken from my sources, it places a resulting screenshot into clipboard (it takes into account that the function may not be supported on some Windows versions, but it seems unimportant to the question):