Hi,
Can anyone tell me why the following code segment wont work. I want to print
the CSliderCtrl as seen on screen to the printer. I can see it in preview
mode but it does not print!
Im using VC++6 and created a new MFC application with the print/preview support
options enabled. Is this an MFC bug?
Thanks
Simon



void CTestView::OnInitialUpdate()
{
CView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
m_slider = new CSliderCtrl;
m_slider->Create(TBS_HORZ | TBS_BOTH | WS_CHILD | WS_VISIBLE |
WS_BORDER, CRect(310, 310, 500, 340), this, 2);
}
........

void CTestView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: Add your specialized code here and/or call the base class
CRect rectt;
GetClientRect( rectt );
CSize pageSize(pDC->GetDeviceCaps(PHYSICALWIDTH), pDC->GetDeviceCaps(PHYSICALHEIGHT));


pDC->SetMapMode(MM_ANISOTROPIC);
pDC->SetWindowExt(rectt.Width(), rectt.Height() );
pDC->SetViewportExt(pageSize.cx, pageSize.cy);
pDC->SetViewportOrg(0,0);

m_slider->Print( pDC, PRF_OWNED | PRF_CLIENT );
CView::OnPrint(pDC, pInfo);
}