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. Line Drawing

Line Drawing

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorialquestion
4 Posts 4 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.
  • B Offline
    B Offline
    Benjamin Bruno
    wrote on last edited by
    #1

    Hi I want to draw line on OnMouseMove function of a dialog class.I want to draw the line in one color(fixed color not inverse color ),but it is showing in different/inverse color. If I omit SetROP2 the line will get spread. <code> CDC* pDC = this->GetDC(); int nR2 = pDC->SetROP2( R2_NOTXORPEN ); pDC->MoveTo(m_StartPoint); pDC->LineTo(m_Previouspoint); m_Previouspoint = point; pDC->MoveTo(m_StartPoint); pDC->LineTo(point); </code> How to solve it? :^) thanks

    S C 2 Replies Last reply
    0
    • B Benjamin Bruno

      Hi I want to draw line on OnMouseMove function of a dialog class.I want to draw the line in one color(fixed color not inverse color ),but it is showing in different/inverse color. If I omit SetROP2 the line will get spread. <code> CDC* pDC = this->GetDC(); int nR2 = pDC->SetROP2( R2_NOTXORPEN ); pDC->MoveTo(m_StartPoint); pDC->LineTo(m_Previouspoint); m_Previouspoint = point; pDC->MoveTo(m_StartPoint); pDC->LineTo(point); </code> How to solve it? :^) thanks

      S Offline
      S Offline
      Shivanand Gupta
      wrote on last edited by
      #2

      Please find previous thread. that will help you

      D 1 Reply Last reply
      0
      • B Benjamin Bruno

        Hi I want to draw line on OnMouseMove function of a dialog class.I want to draw the line in one color(fixed color not inverse color ),but it is showing in different/inverse color. If I omit SetROP2 the line will get spread. <code> CDC* pDC = this->GetDC(); int nR2 = pDC->SetROP2( R2_NOTXORPEN ); pDC->MoveTo(m_StartPoint); pDC->LineTo(m_Previouspoint); m_Previouspoint = point; pDC->MoveTo(m_StartPoint); pDC->LineTo(point); </code> How to solve it? :^) thanks

        C Offline
        C Offline
        Cool_Dev
        wrote on last edited by
        #3

        Benjamin Bruno wrote:

        I want to draw the line in one color(fixed color not inverse color )

        Did you select such a Pen object to your CDC before calling LineTo() function?

        1 Reply Last reply
        0
        • S Shivanand Gupta

          Please find previous thread. that will help you

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Exactly how would finding a thread help in drawing a line? :confused:

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Man who follows car will be exhausted." - Confucius

          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