diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-18 09:06:17 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-18 09:06:17 -0400 |
| commit | 1face3a4554022c9336e89822df586560ef62077 (patch) | |
| tree | ac674cff7261ca0a9508d8ae66b941ed10aa9874 /newctrl/container_windows.go | |
| parent | 45acb35a6d89c2e7c7d2233f3613d04253f88922 (diff) | |
Implemented container.bounds() on Windows.
Diffstat (limited to 'newctrl/container_windows.go')
| -rw-r--r-- | newctrl/container_windows.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/newctrl/container_windows.go b/newctrl/container_windows.go index 5a0336d..31963e0 100644 --- a/newctrl/container_windows.go +++ b/newctrl/container_windows.go @@ -57,6 +57,11 @@ func (c *container) parent() *controlParent { return &controlParent{c.hwnd} } +func (c *container) bounds(d *sizing) (int, int, int, int) { + r := C.containerBounds(c.hwnd) + return int(r.left), int(r.top), int(r.right - r.left), int(r.bottom - r.top) +} + // For Windows, Microsoft just hands you a list of preferred control sizes as part of the MSDN documentation and tells you to roll with it. // These sizes are given in "dialog units", which are independent of the font in use. // We need to convert these into standard pixels, which requires we get the device context of the OS window. |
