robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

Window possition on screen by hwnd (Windows)

Open Era8806 opened this issue 6 years ago • 1 comments

How can I read the position and size of the window after hwnd?

Era8806 avatar Jun 08 '19 03:06 Era8806

https://github.com/go-vgo/robotgo/issues/87 Only Windows you can try package github.com/lxn/win.

var rect win.RECT
win.GetWindowRect(hwnd, &rect)
posionX := int(rect.Left)
posionY := int(rect.Top)
hwndWidth := int(rect.Right - rect.Left)
hwndHeight := int(rect.Bottom - rect.Top)

wilon avatar Jun 10 '19 08:06 wilon