Print Preview using CPreviewDC

Visual Studio73
Hi there,

I have a problem trying to implement a print preview

function. Yet the printing itself is no problem.

I have this chart control with a method



m_graph.PrintGraph(CDC *pDC)



which outputs the data to the CDC object.

Now I want to do Print Preview similarly using the

CPreviewDC class mentioned in the MSDN Documentation

instead of the CDC class.



How do I setup the CPreviewDC object without a print

dialog?

And after I have printed the content into the CDC class

how do I display the print preview?


-