Hi kevin,
What did I wrong? PB crashes if I run this:
[pbcode]
type RECT
Left
Right
Top
Bottom
endtype
dim lpRect as RECT
LinkDll "user32.dll"
GetWindowRect (hwnd, lprect1) alias "GetWindowRect" As integer
EndLinkDll
err=GetWindowRect(getscreenhandle(), lpRect)
print lpRect.Left
print lpRect.Right
print lpRect.Top
print lpRect.Bottom
sync
waitkey
[/pbcode]
[pbcode]
type RECT
Left
Right
Top
Bottom
endtype
dim lpRect as RECT pointer
lprect = new rect
LinkDll "user32.dll"
GetWindowRect (hwnd, lprect1) alias "GetWindowRect" As integer
EndLinkDll
err=GetWindowRect(getscreenhandle(), Int(lpRect))
if err
print lpRect.Left
print lpRect.Right
print lpRect.Top
print lpRect.Bottom
endif
sync
waitkey
[/pbcode]
Thank you very much!