在 main 中使用包 lxn/win:
win.EnumChildWindows(hw, printme, 0)
然后在main之后:
func printme(HWND win.HANDLE, LPARAM uintptr) { //HWND hwnd, LPARAM lParam
spew.Dump(HWND)
}
我明白了:
.\test.go:40: cannot use printme (type func(win.HANDLE, uintptr)) as type uintptr in argument to win.EnumChildWindows
error:exit status 2
我不明白错误信息。