当前位置: 首页>>代码示例>>Golang>>正文


Golang w32.SendMessage函数代码示例

本文整理汇总了Golang中github.com/AllenDang/w32.SendMessage函数的典型用法代码示例。如果您正苦于以下问题:Golang SendMessage函数的具体用法?Golang SendMessage怎么用?Golang SendMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SendMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: EnableDoubleBuffer

func (this *ListView) EnableDoubleBuffer(enable bool) {
	if enable {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, w32.LVS_EX_DOUBLEBUFFER)
	} else {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, w32.LVS_EX_DOUBLEBUFFER, 0)
	}
}
开发者ID:hoperuin,项目名称:gform,代码行数:7,代码来源:listview.go

示例2: EnableFullRowSelect

func (this *ListView) EnableFullRowSelect(enable bool) {
	if enable {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, w32.LVS_EX_FULLROWSELECT)
	} else {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, w32.LVS_EX_FULLROWSELECT, 0)
	}
}
开发者ID:hoperuin,项目名称:gform,代码行数:7,代码来源:listview.go

示例3: EnableHotTrack

func (this *ListView) EnableHotTrack(enable bool) {
	if enable {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, w32.LVS_EX_TRACKSELECT)
	} else {
		w32.SendMessage(this.hwnd, w32.LVM_SETEXTENDEDLISTVIEWSTYLE, w32.LVS_EX_TRACKSELECT, 0)
	}
}
开发者ID:hoperuin,项目名称:gform,代码行数:7,代码来源:listview.go

示例4: SetIcon

// IconType: 1 - ICON_BIG; 0 - ICON_SMALL
func (this *Form) SetIcon(iconType int, icon *Icon) {
	if iconType > 1 {
		panic("IconType is invalid")
	}

	w32.SendMessage(this.hwnd, w32.WM_SETICON, uintptr(iconType), uintptr(icon.Handle()))
}
开发者ID:hoperuin,项目名称:gform,代码行数:8,代码来源:form.go

示例5: SetChecked

func (this *Button) SetChecked(checked bool) {
	wparam := w32.BST_CHECKED
	if !checked {
		wparam = w32.BST_UNCHECKED
	}
	w32.SendMessage(this.hwnd, w32.BM_SETCHECK, uintptr(wparam), 0)
}
开发者ID:foxundermoon,项目名称:gform,代码行数:7,代码来源:buttons.go

示例6: Close

func (this *Window) Close() error {
	err := w32.SendMessage(this.hwnd, w32.WM_CLOSE, 0, 0)
	if err != 0 {
		return errors.New("Error closing window")
	}
	return nil
}
开发者ID:Nightgunner5,项目名称:go.wde,代码行数:7,代码来源:win_windows.go

示例7: ImageList

func (this *ListView) ImageList(imageListType int) *ImageList {
	h := w32.SendMessage(this.hwnd, w32.LVM_GETIMAGELIST, uintptr(imageListType), 0)
	if h == 0 {
		return nil
	}

	return &ImageList{w32.HIMAGELIST(h)}
}
开发者ID:hoperuin,项目名称:gform,代码行数:8,代码来源:listview.go

示例8: AttachListView

func AttachListView(parent Controller, id int) *ListView {
	lv := new(ListView)
	lv.attach(parent, id)
	RegMsgHandler(lv)

	w32.SendMessage(lv.Handle(), w32.LVM_SETUNICODEFORMAT, w32.TRUE, 0)
	return lv
}
开发者ID:hoperuin,项目名称:gform,代码行数:8,代码来源:listview.go

示例9: SetImageList

func (this *ListView) SetImageList(imageList *ImageList, imageListType int) *ImageList {
	h := w32.SendMessage(this.hwnd, w32.LVM_SETIMAGELIST, uintptr(imageListType), uintptr(imageList.Handle()))
	if h == 0 {
		return nil
	}

	return &ImageList{w32.HIMAGELIST(h)}
}
开发者ID:hoperuin,项目名称:gform,代码行数:8,代码来源:listview.go

示例10: AddTool

func (this *ToolTip) AddTool(tool Controller, tip string) bool {
	var ti w32.TOOLINFO
	ti.CbSize = uint32(unsafe.Sizeof(ti))
	if tool.Parent() != nil {
		ti.Hwnd = tool.Parent().Handle()
	}
	ti.UFlags = w32.TTF_IDISHWND | w32.TTF_SUBCLASS
	ti.UId = uintptr(tool.Handle())
	ti.LpszText = syscall.StringToUTF16Ptr(tip)

	return w32.SendMessage(this.Handle(), w32.TTM_ADDTOOL, 0, uintptr(unsafe.Pointer(&ti))) != w32.FALSE
}
开发者ID:foxundermoon,项目名称:gform,代码行数:12,代码来源:tooltip.go

示例11: WndProc

func (this *Form) WndProc(msg uint, wparam, lparam uintptr) uintptr {
	switch msg {
	case w32.WM_LBUTTONDOWN:
		if this.isDragMove {
			w32.ReleaseCapture()
			w32.SendMessage(this.hwnd, w32.WM_NCLBUTTONDOWN, w32.HTCAPTION, 0)
		}
	case w32.WM_CLOSE:
		w32.DestroyWindow(this.hwnd)
	case w32.WM_DESTROY:
		w32.PostQuitMessage(0)
	}

	return w32.DefWindowProc(this.hwnd, msg, wparam, lparam)
}
开发者ID:hoperuin,项目名称:gform,代码行数:15,代码来源:form.go

示例12: WndProc

func (this *Form) WndProc(msg uint, wparam, lparam uintptr) uintptr {
	switch msg {
	case w32.WM_LBUTTONDOWN:
		if this.isDragMove {
			w32.ReleaseCapture()
			w32.SendMessage(this.hwnd, w32.WM_NCLBUTTONDOWN, w32.HTCAPTION, 0)
		}
	case w32.WM_CLOSE:
		this.onClose.Fire(NewEventArg(this, nil))
		return 0
	case w32.WM_DESTROY:
		w32.PostQuitMessage(0)
		return 0
	}
	return w32.DefWindowProc(this.hwnd, uint32(msg), wparam, lparam)
}
开发者ID:foxundermoon,项目名称:gform,代码行数:16,代码来源:form.go

示例13: SelectedItems

// mask is used to set the LVITEM.Mask for ListView.GetItem which indicates which attributes you'd like to receive
// of LVITEM.
func (this *ListView) SelectedItems(mask uint) []*w32.LVITEM {
	items := make([]*w32.LVITEM, 0)

	var i int = -1
	for {
		if i = int(w32.SendMessage(this.hwnd, w32.LVM_GETNEXTITEM, uintptr(i), uintptr(w32.LVNI_SELECTED))); i == -1 {
			break
		}

		var item w32.LVITEM
		item.Mask = mask
		item.IItem = i
		if this.Item(&item) {
			items = append(items, &item)
		}
	}
	return items
}
开发者ID:hoperuin,项目名称:gform,代码行数:20,代码来源:listview.go

示例14: SetValue

func (this *ProgressBar) SetValue(v uint) {
	w32.SendMessage(this.hwnd, w32.PBM_SETPOS, uintptr(v), 0)
}
开发者ID:foxundermoon,项目名称:gform,代码行数:3,代码来源:progressbar.go

示例15: Value

func (this *ProgressBar) Value() uint {
	ret := w32.SendMessage(this.hwnd, w32.PBM_GETPOS, 0, 0)
	return uint(ret)
}
开发者ID:foxundermoon,项目名称:gform,代码行数:4,代码来源:progressbar.go


注:本文中的github.com/AllenDang/w32.SendMessage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。