Golang github.com-AllenDang-w32.MoveWindow类(方法)实例源码

下面列出了Golang github.com-AllenDang-w32.MoveWindow 类(方法)源码代码实例,从而了解它的用法。

作者:Nightgunner    项目:go.wd   
func (this *Window) SetPos(x, y int) {
	w, h := this.Size()
	if w == 0 {
		w = 100
	}
	if h == 0 {
		h = 25
	}
	w32.MoveWindow(this.hwnd, x, y, w, h, true)
}

作者:js-aria    项目:spart   
// SetProperty sets a window property.
func (win *window) SetProperty(p sparta.Property, v interface{}) {
	switch p {
	case sparta.Caption:
		if win.w.Property(sparta.Parent) != nil {
			break
		}
		w32.SetWindowText(win.id, v.(string))
	case sparta.Geometry:
		val := v.(image.Rectangle)
		w32.MoveWindow(win.id, val.Min.X, val.Min.Y, val.Dx(), val.Dy(), true)
	case sparta.Foreground:
		val := v.(color.RGBA)
		win.fore = getBrush(val)
	case sparta.Background:
		val := v.(color.RGBA)
		win.back = getBrush(val)
	}
}

作者:Nightgunner    项目:go.wd   
func (this *Window) SetSize(width, height int) {
	x, y := this.Pos()
	w32.MoveWindow(this.hwnd, x, y, width, height, true)
}


问题


面经


文章

微信
公众号

扫码关注公众号