Jimmy J
Jimmy J

Reputation: 1985

I don't always receive WM_LBUTTONDBLCLK

I'm writing an app (in C++) which uses WM_LBUTTONDBLCLK.

It's all working fine except but I don't always get the DBLCLK message. Quite often I get two WM_LBUTTONDOWN messages instead.

I've looked at the mouse position - it doesn't move.

I've looked at the time between the two WM_LBUTTONDOWN messages - it's well within the value returned by GetDoubleClickTime()

I'm returning 0 for WM_LBUTTONDOWN, WM_LBUTTONUP and WM_LBUTTONDBLCLK.

What would cause this? I'm stumped.

PS: I've tried Windows XP and 7 - same result.

Upvotes: 5

Views: 5371

Answers (1)

rockdino
rockdino

Reputation: 101

To provoking WM_RBUTTONDBLCLK and WM_LBUTTONDBLCLK cases instead of 2 pairs of buttondown and ups you have to add CS_DBLCLKS flag in your windows style.

Upvotes: 7

Related Questions