(hwnd win.HWND)
| 1228 | } |
| 1229 | |
| 1230 | func windowText(hwnd win.HWND) string { |
| 1231 | textLength := win.SendMessage(hwnd, win.WM_GETTEXTLENGTH, 0, 0) |
| 1232 | buf := make([]uint16, textLength+1) |
| 1233 | win.SendMessage(hwnd, win.WM_GETTEXT, uintptr(textLength+1), uintptr(unsafe.Pointer(&buf[0]))) |
| 1234 | return syscall.UTF16ToString(buf) |
| 1235 | } |
| 1236 | |
| 1237 | func setWindowText(hwnd win.HWND, text string) error { |
| 1238 | if win.TRUE != win.SendMessage(hwnd, win.WM_SETTEXT, 0, uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text)))) { |
no test coverage detected
searching dependent graphs…