Is a mouse click a WM_* message or a combination of up & down messages?

James Cadd picture James Cadd · Sep 17, 2009 · Viewed 11.4k times · Source

I'm used to working with a Windows framework that provides events for things like a mouse click or a mouse double click. Are click events a Windows construct (i.e. does Windows send a WM_DOUBLECLICK or similar message) or does it send WM_MOUSEDOWN and WM_MOUSEUP to applications which then do some math to decide if the event was a click or otherwise?

Answer

Ben S picture Ben S · Oct 13, 2009

According to MSDN documentation The correct order of messages you will see for double click event are - WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_LBUTTONUP