Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. mirror image of a page (problem)

mirror image of a page (problem)

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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 (); } }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups