amateurtore.blogg.se

Purebasic window cursor position
Purebasic window cursor position







purebasic window cursor position

' get the class name of the parent window:

purebasic window cursor position

Print "Parent Window Text: " & Left(sParentWindowText, r) R = GetWindowText(hWndParent, sParentWindowText, 100) Print "Parent Window Handle: &H" Hex(hWndParent) Print "Window Style: &H" Hex(lWindowStyle) LWindowStyle = GetWindowLong(hWndOver, GWL_STYLE) ' Window Style Print "Window Class Name: " Left(sClassName, r) R = GetClassName(hWndOver, sClassName, 100) ' Window Class Print "Window Text: " & Left(sWindowText, r) R = GetWindowText(hWndOver, sWindowText, 100) ' Window text Print "Window Handle: &H" Hex(hWndOver) ' Display window handle

#Purebasic window cursor position update#

If hWndOver <> hWndLast then ' If changed update display

HWndOver = WindowFromPointXY(ptx, pty) ' get window cursor is over "GetWindowTextA" (byval hwnd as Long, byval lpString as string, _Ĭall GetCursorPos(pt32) ' get cursor position Private Declare Function GetWindowText Lib "User32" Alias _ "GetClassNameA" (byval hwnd as Long, byval lpClassName as _ Private Declare Function GetClassName Lib "User32" Alias _

purebasic window cursor position

Private Declare Function GetParent Lib "User32" (byval hwnd as _ "GetWindowLongA" (byval hwnd as Long, byval nIndex as Long) as _ Private Declare Function GetWindowLong Lib "User32" Alias _ Private Declare Function GetWindowWord Lib "User32" (byval hwnd as _ "GetModuleFileNameA" (byval hModule as Long, byval lpFileName as _ Private Declare Function GetModuleFileName Lib "kernel32" Alias _ "WindowFromPoint" (byval xPoint as Long, byval yPoint as Long) _ Private Declare Function WindowFromPointXY Lib "User32" Alias _ Private Declare Function GetCursorPos Lib "User32" (lpPoint as _









Purebasic window cursor position