January 24, 2021, 11:34:55 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bmx] Mouse commands by JoshK [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bmx] Mouse commands by JoshK [ 1+ years ago ] (Read 505 times)
BlitzBot
Jr. Member
Posts: 1
[bmx] Mouse commands by JoshK [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:39 AM »
Title :
Mouse commands
Author :
JoshK
Posted :
1+ years ago
Description :
Replacement mouse commands for gadget mouse coordinates.
Code :
Code: BlitzMax
SuperStrict
Import
maxgui.maxgui
Import
pub.win32
Private
?win32
Extern
"win32"
Function
GetCursorPos:
Int
(
point:
Byte
Ptr
)
Function
SetCursorPos:
Int
(
x:
Int
,y:
Int
)
Function
ScreenToClient:
Int
(
hwnd:
Int
,point:
Byte
Ptr
)
EndExtern
?
Public
Function
MouseX:
Int
(
gadget:TGadget=
Null
)
Local
hwnd:
Int
Local
pos:
Int
[
2
]
GetCursorPos pos
If
gadget screentoclient QueryGadget
(
gadget,QUERY_HWND
)
,pos
Return
pos
[
0
]
EndFunction
Function
MouseY:
Int
(
gadget:TGadget=
Null
)
Local
hwnd:
Int
Local
pos:
Int
[
2
]
GetCursorPos pos
If
gadget screentoclient QueryGadget
(
gadget,QUERY_HWND
)
,pos
Return
pos
[
1
]
EndFunction
Function
MoveMouse
(
x:
Int
,y:
Int
,gadget:TGadget=
Null
)
Local
hwnd:
Int
Local
pos:
Int
[
2
]
pos
[
0
]
=x
pos
[
1
]
=y
If
gadget clienttoscreen QueryGadget
(
gadget,QUERY_HWND
)
,pos
SetCursorPos pos
[
0
]
,pos
[
1
]
EndFunction
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bmx] Mouse commands by JoshK [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal