How Can you Tell if Mouse is outside Window?

Blitz3D Forums/Blitz3D Programming/How Can you Tell if Mouse is outside Window?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

when you say leaving the blitz3d window, you mean while still active? if so! heres one possable method.

you would need to create a .decls
.lib "user32.dll"
GetCursorPos%(lppoint*):"GetCursorPos"
WindowFromPoint%(lppoint*):"WindowFromPoint"


now get the blitz3d hwnd pointer using SystemProperty("AppHwnd") and check against the hwnd pointer returned from the api call WindowFromPoint()

bank = createbank(8)
GetCursorPos(bank)
hwnd_under_pointer = WindowFromPoint(bank)
blitz3d_hwnd = SystemProperty("AppHwnd")

this is untested but should work.

kev