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. Printing Problem

Printing Problem

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 0 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.
  • P Offline
    P Offline
    pri_skit
    wrote on last edited by
    #1

    I am using MM_TEXT mode during Ondraw(CDC *pDC) function & displayed a rectangle but during printing i am using MM_TWIPS mapmode now i want to use CoOrdinate used during Ondraw.I tried to convert Co-ordnate into correct pixels. Here is code: // during On draw pDC->MoveTo(p1); pDC->LineTo(p2); pDC->LineTo(p3); pDC->LineTo(p4); pDC->LineTo(p1); // some macro #define CalibPoint(p, HorPix,VerPix) CPoint(CALIBX(p.x,HorPix),CALIBY(p.y,VerPix)) #define CALIBX(point,HPIX) (point * HPIX )/PIXPERINCH #define CALIBY(point,VPIX) (point * VPIX )/PIXPERINCH #define PIXPERINCH 72 int nHorz = pDC->GetDeviceCaps(LOGPIXELSX); int nVert = pDC->GetDeviceCaps(LOGPIXELSY); //during printing p1=CalibPoint(p1, nHorz,nVert);//CalibPoint is Macro p2=CalibPoint(p2, nHorz,nVert); p3=CalibPoint(p3, nHorz,nVert); p4=CalibPoint(p4, nHorz,nVert); pDC->MoveTo(p1.x,-p1.y); pDC->LineTo(p2.x,-p2.y); pDC->LineTo(p3.x,-p3.y); pDC->LineTo(p4.x,-p4.y); pDC->LineTo(p1.x,-p1.y); Thanks & regards priyank Dwivedi

    priyank

    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