mirror image of a page (problem)
-
I am using StretchBlt to make a mirror image of the page. While the normal page prints on when I try to use StretchBlt on this StretchBlt always return 1 but prints nothing. Pl. Help Me!. I am embeding the source func. /* --------------------------------------------------- */ void CTprView::OnPrint(CDC* pDC, CPrintInfo* pInfo) { int top,left,right,bottom; RECT rt ; pDC->SetMapMode (MM_ANISOTROPIC) ; PrDC.SetMapMode (MY_MODE) ; // this is the CreatIC of the default printer driver pDC->SelectObject (&pen) ; PrDC.SelectObject (&pen) ; top = TopMargin ; left = (int)((LeftMargin * hPixPerMM) - (int)(hPixPerMM/1.5)); right = (int)((ColWith * 3.00) + (Gutter * 2.00) + (hPixPerMM * 1.5)) ; bottom = (int)(vPixPerMM * m_PgLn); if (m_mirror != TRUE) { PreparePages (pDC, pInfo) ; TestPage (pDC, pInfo) ; } else { MirrorDC.CreateCompatibleDC(pDC); MirrorDC.SetMapMode (MY_MODE) ; MirrorDC.SetTextColor (RGB (0,0,0)); MirrorDC.SetViewportOrg (0, 0) ; MirrorDC.SetWindowOrg (0, 0) ; PreparePages (&MirrorDC, pInfo) ; // if pages=1 then calculates pages into a CTypedPtrArray TestPage (&MirrorDC, pInfo) ; // draws text,bitmaps & lines on the CDC provided if (!IsInCalc) { rt.top = top ; rt.left = left; rt.right = right; rt.bottom = bottom; PrDC.DPtoLP (&rt) ; top=pDC->StretchBlt(left,top,right,-bottom,&MirrorDC,left,top,right,bottom,SRCCOPY); CString cTmp ; cTmp.Format("Ret. Value = %d", top) ; MessageBox (cTmp, "S.Blt", MB_OK) ; } MirrorDC.DeleteDC (); } }