代码实例:
package main
import (
"syscall"
"github.com/lxn/win"
)
func main() {
println(FindWindow(`QQ`))
}
func FindWindow(str string) win.HWND {
return win.FindWindow(nil, syscall.StringToUTF16Ptr(str))
}
package main
import (
"syscall"
"github.com/lxn/win"
)
func main() {
println(FindWindow(`QQ`))
}
func FindWindow(str string) win.HWND {
return win.FindWindow(nil, syscall.StringToUTF16Ptr(str))
}
本文标题:Go语言:获取指定标题程序的句柄
本文链接:https://www.haomeiwen.com/subject/dholvctx.html
网友评论