コード例 #1
0
ファイル: controlbase.go プロジェクト: daviddengcn/gform
func (this *ControlBase) Bounds() *Rect {
	rect := w32.GetWindowRect(this.hwnd)
	if this.isForm {
		return (*Rect)(rect)
	}

	return ScreenToClientRect(this.hwnd, rect)
}
コード例 #2
0
ファイル: controlbase.go プロジェクト: daviddengcn/gform
func (this *ControlBase) Pos() (x, y int) {
	rect := w32.GetWindowRect(this.hwnd)
	x = int(rect.Left)
	y = int(rect.Top)
	if !this.isForm && this.parent != nil {
		x, y, _ = w32.ScreenToClient(this.parent.Handle(), x, y)
	}
	return
}
コード例 #3
0
ファイル: win_windows.go プロジェクト: Nightgunner5/go.wde
func (this *Window) Pos() (x, y int) {
	rect := w32.GetWindowRect(this.hwnd)
	return int(rect.Left), int(rect.Top)
}
コード例 #4
0
ファイル: controlbase.go プロジェクト: daviddengcn/gform
func (this *ControlBase) Height() int {
	rect := w32.GetWindowRect(this.hwnd)
	return int(rect.Bottom - rect.Top)
}
コード例 #5
0
ファイル: controlbase.go プロジェクト: daviddengcn/gform
func (this *ControlBase) Width() int {
	rect := w32.GetWindowRect(this.hwnd)
	return int(rect.Right - rect.Left)
}
コード例 #6
0
ファイル: controlbase.go プロジェクト: daviddengcn/gform
func (this *ControlBase) Size() (width, height int) {
	rect := w32.GetWindowRect(this.hwnd)
	width = int(rect.Right - rect.Left)
	height = int(rect.Bottom - rect.Top)
	return
}