• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang w32.SendMessage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: SetItemCount

func (this *ListView) SetItemCount(count int) bool {
	return w32.SendMessage(this.hwnd, w32.LVM_SETITEMCOUNT, uintptr(count), 0) != 0
}
开发者ID:hoperuin,项目名称:gform,代码行数:3,代码来源:listview.go


示例17: ItemCount

func (this *ListView) ItemCount() int {
	return int(w32.SendMessage(this.hwnd, w32.LVM_GETITEMCOUNT, 0, 0))
}
开发者ID:hoperuin,项目名称:gform,代码行数:3,代码来源:listview.go


示例18: SetRange

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


示例19: Range

func (this *ProgressBar) Range() (min, max uint) {
	min = uint(w32.SendMessage(this.hwnd, w32.PBM_GETRANGE, uintptr(w32.BoolToBOOL(true)), 0))
	max = uint(w32.SendMessage(this.hwnd, w32.PBM_GETRANGE, uintptr(w32.BoolToBOOL(false)), 0))
	return
}
开发者ID:foxundermoon,项目名称:gform,代码行数:5,代码来源:progressbar.go


示例20: setItemState

// Changes the state of an item in a list-view control. Refer LVM_SETITEMSTATE message.
func (this *ListView) setItemState(i int, state, mask uint) {
	var item w32.LVITEM
	item.State, item.StateMask = state, mask

	w32.SendMessage(this.hwnd, w32.LVM_SETITEMSTATE, uintptr(i), uintptr(unsafe.Pointer(&item)))
}
开发者ID:hoperuin,项目名称:gform,代码行数:7,代码来源:listview.go



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang w32.TRACKMOUSEEVENT类代码示例发布时间:2022-05-24
下一篇:
Golang w32.MoveWindow函数代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap