SetCapture() is the correct way to handle mouse drag (press button, move
mouse around, release button) functionality. It's important to handle
WM_CAPTURELOST as well. SetCapture() is appropriate here because it's a
temporary state.
SetCapture() is NOT the correct way to receive all mouse input even if the
mouse is outside the window, because this is not temporary. In fact,
receiving mouse input when the mouse is outside the window should be done
only in drag situations (but I know this is not always possible).
Javier Arevalo
Pyro Studios
----- Original Message -----
From: "Brian Hook" <bri...@py...>
To: <gam...@li...>
Sent: Thursday, February 07, 2002 2:23 AM
Subject: [GD-Windows] Out of window mouse up messages
> I'm tracking drag state in my app, however I'm running into a problem
> when the mouse button is pressed, the cursor is dragged outside the
> window, and then the mouse button is released. I never see the release,
> which gets my app confused.
>
> Is there a simple way of getting around this, or should I simply check
> the mouse button state every time I get a move message to verify its
> authenticity?
|