Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double click processing for roassal #507

Open
akevalion opened this issue Feb 20, 2023 · 1 comment
Open

Double click processing for roassal #507

akevalion opened this issue Feb 20, 2023 · 1 comment

Comments

@akevalion
Copy link
Contributor

From discord Pavel said

looking into trustworthy Programming Windows 3.1 book , I found this:

If you want your window procedure to receive double-click mouse messages, you
must include the identifier CS-DBLCLKS when initializing the window style in the window
class structure before calling Register Class:

wndcl ass. style = CS_H REDRAW ! CS.VREDRAW ! CS_DBLCLKS ;

If you do not include CS_DBLCLKS in the window style and the user clicks the left mouse
button twice in quick succession, your window procedure receives these messages:
WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDOWN, and WM-LBUT-
TONUP. (The window procedure might also receive other messages between these button
messages.) If you want to implement your own double-click logic, you can use the Win¬
dows function GetMessageTime to obtain the relative times of the WM-LBUTTONDOWN
messages. This function is discussed in more detail in Chapter 5.

If you include CS_DBLCLKS in your window class, the window procedure receives
these messages for a double-click: WM-LBUTTONDOWN, WM-LBUTTONUP, WM-
_LBUTTONDBLCLK, and WM_LBUTTONUP. The WM-LBUTTONDBLCLK message sim¬
ply replaces the second WM-LBUTTONDOWN message.

...this is nice and reasonable solution of double-click processing
instead of direct detection, it may just check if there is a handler for a double click

@akevalion
Copy link
Contributor Author

moved to pharo-graphics/Roassal

@akevalion akevalion reopened this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant