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. how to convert from device coordinates into physical coordinates

how to convert from device coordinates into physical coordinates

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorialquestion
2 Posts 2 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
    pathi
    wrote on last edited by
    #1

    Hi I used logical coordinates in my program,in such functions as MoveTo() ,LineTo()etc.But if I scroll the client are i am not able to get those points.i am using CScrollView only.how to convert the coordinates and get the points? thanks in advance. Pathi bhikshapathi_g@semanticspace.com

    T 1 Reply Last reply
    0
    • P pathi

      Hi I used logical coordinates in my program,in such functions as MoveTo() ,LineTo()etc.But if I scroll the client are i am not able to get those points.i am using CScrollView only.how to convert the coordinates and get the points? thanks in advance. Pathi bhikshapathi_g@semanticspace.com

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Assuming that you're writing a method of CScrollView-derived class, you'd code like this:

      CClientDC dc(this);
      OnPrepareDC(&dc);
      dc.LPtoDP(&point);

      Tomasz Sowinski -- http://www.shooltz.com

      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