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. Help with a simple Paint clone in Win32

Help with a simple Paint clone in Win32

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestiongraphics
3 Posts 2 Posters 2 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
    Lord Kixdemp
    wrote on last edited by
    #1

    Hello everyone! Miss me? No? Aww. :( Anyway, I'm trying to make a very simplistic Paint clone. I have a question: I trap mouse drawing with WM_MOUSEMOVE. However, it draws in dots, as in, if I want a doodle I have to go very slowly. How would I fix this? Maybe interpolating; drawing a line between the previous and current dots? But that would be very squareish... Can somebody fill me with their wisdom so I can figure this out? Thanks!

    Windows Calculator told me I will die at 28. :(

    CPalliniC 1 Reply Last reply
    0
    • L Lord Kixdemp

      Hello everyone! Miss me? No? Aww. :( Anyway, I'm trying to make a very simplistic Paint clone. I have a question: I trap mouse drawing with WM_MOUSEMOVE. However, it draws in dots, as in, if I want a doodle I have to go very slowly. How would I fix this? Maybe interpolating; drawing a line between the previous and current dots? But that would be very squareish... Can somebody fill me with their wisdom so I can figure this out? Thanks!

      Windows Calculator told me I will die at 28. :(

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      Windows does not send the application a WM_MOUSEMOVE message for each pixel the mouse pointer passes on, hence you have to deal with a discrete set of disconnected points. You can either (as you realized) connect them with straight lines the obtained point or use some curve (for instance splines) to make the path appear smoother. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      [my articles]

      In testa che avete, signor di Ceprano?

      L 1 Reply Last reply
      0
      • CPalliniC CPallini

        Windows does not send the application a WM_MOUSEMOVE message for each pixel the mouse pointer passes on, hence you have to deal with a discrete set of disconnected points. You can either (as you realized) connect them with straight lines the obtained point or use some curve (for instance splines) to make the path appear smoother. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        [my articles]

        L Offline
        L Offline
        Lord Kixdemp
        wrote on last edited by
        #3

        I'll try the straight line then and then the curved one, if it doesn't look good. Thanks! ;)

        Windows Calculator told me I will die at 28. :(

        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