Page 1 of 1
[Implemented] window mouse button command or event
Posted: Tue Aug 27, 2002 9:00 pm
by BackupUser
Restored from previous forum. Originally posted by BalrogSoft.
Hi...
Fred: i think that it could be a great command to add a WindowMouseButton, because exists WindowMouseX and WindowMouseY, i think that is logic to add this command, or at least add a mouse button event in WindowEvent(), i need for some projects, and probably it could help to other coders...
Bye... Balrog Soft.
Balrog Soft
Amiga and PC Coder
http://www.balrogsoftware.com
[url]mailto:
balrog@balrogsoftware.com[/url]
Posted: Wed Aug 28, 2002 4:48 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.
Yes, this should be included in PurebBasic
with PB-Constants (for all Platforms).
In the meanwhile you can use the following for Windows:
Code: Select all
hWnd = OpenWindow(1,10,10,300,300,#PB_Window_SystemMenu,"")
Repeat
Select WaitWindowEvent()
Case #WM_RButtonDown : A$ = "Right Mouse Button pressed"
Case #WM_RButtonUp : A$ = "Right Mouse Button released"
Case #WM_LButtonDown : A$ = "Left Mouse Button pressed"
Case #WM_LButtonUp : A$ = "Left Mouse Button released"
Case #WM_MOUSEMOVE : A$ = "Mouse has moved"
Case #PB_EventCloseWindow: End
EndSelect
SetWindowText_(hWnd, A$):
ForEver
cya,
...Danilo
(registered PureBasic user)
Posted: Wed Aug 28, 2002 6:25 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
Are there WM constants for the wheel and the middle button
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Thu Aug 29, 2002 12:32 am
by BackupUser
Restored from previous forum. Originally posted by blueb.
Franco:
These are the standard API mouse messages.
WM_CAPTURECHANGED
WM_LBUTTONDBLCLK
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MBUTTONDBLCLK
WM_MBUTTONDOWN
WM_MBUTTONUP
WM_MOUSEACTIVATE
WM_MOUSEMOVE
WM_MOUSEWHEEL
WM_NCHITTEST
WM_NCLBUTTONDBLCLK
WM_NCLBUTTONDOWN
WM_NCLBUTTONUP
WM_NCMBUTTONDBLCLK
WM_NCMBUTTONDOWN
WM_NCMBUTTONUP
WM_NCMOUSEMOVE
WM_NCRBUTTONDBLCLK
WM_NCRBUTTONDOWN
WM_NCRBUTTONUP
WM_RBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
--Bob