How to get window client area pos? (x y width height)
Thanks!
How to get window client area pos? (x y width height)
Re: How to get window client area pos? (x y width height)
WinGetClientPos. Cheers.
commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=29689
commands as functions (AHK v2 functions for AHK v1) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=29689
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: How to get window client area pos? (x y width height)
Thanks @jeeswg! Does it work with AHK 64 bit?
Code: Select all
;from WinGetClientPos() - "jeeswg" forum user
;https://www.autohotkey.com/boards/viewtopic.php?p=209004#p209004
gui, +HwndWinId
gui, show, w300 h200
WinGetPos, Win_X, Win_Y, Win_W, Win_H, % "ahk_id" WinId
VarSetCapacity(RECT, 16, 0)
DllCall("user32\GetClientRect", Ptr,WinId, Ptr,&RECT)
DllCall("user32\ClientToScreen", Ptr,WinId, Ptr,&RECT)
Win_Client_X := NumGet(&RECT, 0, "Int")
Win_Client_Y := NumGet(&RECT, 4, "Int")
Win_Client_W := NumGet(&RECT, 8, "Int")
Win_Client_H := NumGet(&RECT, 12, "Int")
msgbox, % ""
. Win_X " - " Win_y " - " Win_w " - " Win_h "`r`n"
. "`r`n"
. Win_Client_X " - " Win_Client_y " - " Win_Client_w " - " Win_Client_h "`r`n"
return
guiclose: ;____________________
exitapp
Re: How to get window client area pos? (x y width height)
- Every script I write should work in both x64 and x32, otherwise there would be a bug of some kind.
- I tested the function just now and it worked in both.
- I tested the function just now and it worked in both.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Bing [Bot], Kintaro-OEx, peter_ahk and 368 guests