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. Problem regerding LineTo(..)

Problem regerding LineTo(..)

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 Posts 3 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.
  • S Offline
    S Offline
    summo
    wrote on last edited by
    #1

    I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon

    J J 2 Replies Last reply
    0
    • S summo

      I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon

      J Offline
      J Offline
      JensB
      wrote on last edited by
      #2

      pDC->MoveTo(x,y) That is the startpoint where you will start drawing your line. I don't see why you move 2 times to the same place. I think you want something like this pDC->MoveTo(startpointx, startpointy); pDC->LineTo(endpointx, endpointy); so you needed LineTo with a EndPoint of course i hope this helps Greetings Jens

      1 Reply Last reply
      0
      • S summo

        I want to draw lines on a dialog in MFC(SDI) application. Currently I am doing the same thing in OnDraw function of my CAppView by using the code. pDC->MoveTo(x1,y1); pDC->MoveTo(x1,y2); Now I want to draw these lines on a dialog. Is it possible. Can I use the same functions. If yes, Then what would I use in place of pDC to call these functions. If not refer me other ways of doing so. Reply me soon

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        Do the same thing you did in OnDraw() only do it in the dialogs OnPaint(). Trust in the code Luke. Yea right!

        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