I was handed down a CDialog based program. This program does all sorts of graphing, and just doodles all over the dialog area (using SetPixelV, LineTo, etc). What I want to do is know the most efficient code for extracting a rectangular region of pixels from the dialog area, and spooling them out to the printer so that it fills exactly the entire page no matter what printer I am on.
Example to make myself more clear:
There is a dialog box. There are no controls or buttons or anything on it whatsoever. Some stuff was doodled onto it.
The dialog boxes coordinates are (0,0 to 400,400)
I want to extract a (50,50 to 200,200) rect from the dialog box and send it to the printer in such a way that it always fills one full piece of paper.
How do I accomplish this the best possible way?
Thanks in advance.