My application is a SDI with three splitter windows. I want to print one of the windows which contains a graph (Brian Convery's X-Y line graph). A CDC pointer pDC is passed to a function called CGraph::PrintGraphBase(CDC *pDC) when OnDraw is called. In this function pDC->GetWindow is called. But the function returns NULL. I don't know why but when looking in MSDN I find,

"This is an advanced function. For example, this member function may not return the view window when printing or in print preview"

...may not...
What is this?
Is there another function to use to get the window from the pDC?