func (lv *LogView) setReadOnly(readOnly bool) error { if 0 == lv.SendMessage(win.EM_SETREADONLY, uintptr(win.BoolToBOOL(readOnly)), 0) { return errors.New("fail to call EM_SETREADONLY") } return nil }
func (le *LineEdit) SetReadOnly(readOnly bool) error { if 0 == le.SendMessage(win.EM_SETREADONLY, uintptr(win.BoolToBOOL(readOnly)), 0) { return newError("SendMessage(EM_SETREADONLY)") } le.readOnlyChangedPublisher.Publish() return nil }
func (te *TextEdit) ReplaceSelectedText(text string, canUndo bool) { te.SendMessage(win.EM_REPLACESEL, uintptr(win.BoolToBOOL(canUndo)), uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text)))) }