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 (te *TextEdit) SetReadOnly(readOnly bool) error { if 0 == te.SendMessage(win.EM_SETREADONLY, uintptr(win.BoolToBOOL(readOnly)), 0) { return newError("SendMessage(EM_SETREADONLY)") } te.readOnlyChangedPublisher.Publish() return nil }
func (pb *ProgressBar) SetMarqueeMode(marqueeMode bool) error { if err := pb.ensureStyleBits(win.PBS_MARQUEE, marqueeMode); err != nil { return err } pb.SendMessage(win.PBM_SETMARQUEE, uintptr(win.BoolToBOOL(marqueeMode)), 0) 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)))) }