WinFBE 1.7.5 - Control Event

Started by SeaVipe, August 26, 2018, 03:41:47 PM

Previous topic - Next topic

SeaVipe

Hi Paul,
While testing the Label DoubleClick crash reported earlier, I switched temporarily to checking if the same issue occurred when double_clicking on a form (it doesn't). To do his I commented out the Label Event functions - as I wished to revisit them later - but neglected to uncheck the corresponding Label's Events in Designer. (Attempting to compile in this configuration results in a Link Error.) Switching back to the editor, I see that the Functions have been added back in, in their default "Function = 0" format. I know this was dealt with in a much earlier post but in my search of the forum I couldn't find your previous explanation. I believe this is correct behavior and not a bug, though maybe unchecking the event could comment out the function and its user code.

BTW, on a Form, a single DoubleClick, results in the following 6 Events in order:

       
  • MouseDown
  • MouseUp
  • Click
  • MouseDoubleClick
  • MouseUp
  • Click
Is this correct?
Clive Richey

Paul Squires

Yes, that sequence is correct. Let me explain a bit about it though......
Per, https://docs.microsoft.com/en-us/windows/desktop/inputdev/wm-lbuttondblclk you will find this paragraph:

"Only windows that have the CS_DBLCLKS style can receive WM_LBUTTONDBLCLK messages, which the system generates whenever the user presses, releases, and again presses the left mouse button within the system's double-click time limit. Double-clicking the left mouse button actually generates a sequence of four messages: WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, and WM_LBUTTONUP."

So, those 4 messages should fire whenever a doubleclick happens on a Form (all WinFBE forms have CS_DBLCLKS enabled by default). The extra 2 click messages are not really true Windows messages but an event that WinFBE generates whenever a WM_LBUTTONUP fires. So, because there are 2 WM_LBUTTONUP's there will be 2 Clicks.


Paul Squires
PlanetSquires Software

SeaVipe

So Click and DoubleClick both fire the controls Click Event?
Clive Richey