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. SetCursorPos and WM_MOUSEMOVE

SetCursorPos and WM_MOUSEMOVE

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 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.
  • M Offline
    M Offline
    mishgun
    wrote on last edited by
    #1

    hello. i have overriden WindowProc for CButton-derived control and handle WM_MOUSEMOVE message in message handler i call ::SetCursorPos all i want to know is: does ::SetCursorPos function send WM_MOUSEMOVE message or not? thanks in advance nobody is perfect

    P 1 Reply Last reply
    0
    • M mishgun

      hello. i have overriden WindowProc for CButton-derived control and handle WM_MOUSEMOVE message in message handler i call ::SetCursorPos all i want to know is: does ::SetCursorPos function send WM_MOUSEMOVE message or not? thanks in advance nobody is perfect

      P Offline
      P Offline
      PJ Arends
      wrote on last edited by
      #2

      AFIAK it sends the WM_MOUSEMOVE message to the window that contains the cursor's new position, but not to the window that contains the cursors old position.


      CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

      M 1 Reply Last reply
      0
      • P PJ Arends

        AFIAK it sends the WM_MOUSEMOVE message to the window that contains the cursor's new position, but not to the window that contains the cursors old position.


        CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

        M Offline
        M Offline
        mishgun
        wrote on last edited by
        #3

        what about SetCapture? nobody is perfect

        P 1 Reply Last reply
        0
        • M mishgun

          what about SetCapture? nobody is perfect

          P Offline
          P Offline
          PJ Arends
          wrote on last edited by
          #4

          What about it?


          CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

          M 1 Reply Last reply
          0
          • P PJ Arends

            What about it?


            CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

            M Offline
            M Offline
            mishgun
            wrote on last edited by
            #5

            i meant that if i SetCapture in CButton-derived control and in its WM_MOUSEMOVE message handler call ::SetCursorPos, will this control receive MW_MOUSEMOVE again? nobody is perfect

            P 1 Reply Last reply
            0
            • M mishgun

              i meant that if i SetCapture in CButton-derived control and in its WM_MOUSEMOVE message handler call ::SetCursorPos, will this control receive MW_MOUSEMOVE again? nobody is perfect

              P Offline
              P Offline
              PJ Arends
              wrote on last edited by
              #6

              Yes, I believe so. Any window that has captured the mouse will receive all mouse messages.


              CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!

              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