Jump to content

  • Log In with Google      Sign In   
  • Create Account


SetCapture and ReleaseCapture during pressing button, minimizing window?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 anders211   Members   -  Reputation: 184

Like
0Likes
Like

Posted 28 November 2012 - 12:13 AM

I noticed in the DXUT libraries that during servicing WM_L/R/MBUTTONDOWN there is SetCapture(some handle) and during WM_L/R/MBUTTONUP there is ReleaseCapture(). I suspect that this handle is exactly the same as the first parameter in window message procedure. The same is when we simulate minimized the window. Frankly speaking I don't understand what SetCapture and ReleaseCapture might serve in this case and why it is executed. DOes anybody has some assumptions?

Sponsor:

#2 Erik Rufelt   Crossbones+   -  Reputation: 3151

Like
0Likes
Like

Posted 28 November 2012 - 03:46 AM

SetCapture captures the mouse to a specific window, so that the window keeps getting mouse-messages even if the cursor moves outside its client area, for example WM_MOUSEMOVE and WM_LBUTTONUP. I guess it's used to support dragging within the window for example when rotating a model or moving the camera with the mouse.
If you don't do SetCapture you never get a WM_LBUTTONUP if the mouse moves outside the window before the button is released after a WM_LBUTTONDOWN.

Edited by Erik Rufelt, 28 November 2012 - 03:47 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS