这里依赖的是
github.com/lxn/win v0.0.0-20210218163916-a377121e959e
import "github.com/lxn/win"
var window = &win.RECT{}
func getDnfWindows() bool {
return win.GetWindowRect(robotgo.FindWindow("地下城与勇士:创新世纪"), window)
}
// rect里面的left,top则表示左上角,right宽,bottom高
Left, Top, Right, Bottom int32