diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-16 13:53:05 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-16 13:53:05 -0400 |
| commit | b27671740d0685aecfc57c9e3e942d424a0ad35e (patch) | |
| tree | ec5ff9dc95855270f278e58d8d2e0291732c24a9 /newctrl/container_windows.go | |
| parent | e78624f057c6c9a7d4d6f04da0130d9d524bce9d (diff) | |
Removed the whole store**HWND spiel. No longer works properly (nil pointers woo).
Diffstat (limited to 'newctrl/container_windows.go')
| -rw-r--r-- | newctrl/container_windows.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/newctrl/container_windows.go b/newctrl/container_windows.go index fe40f01..91aee8f 100644 --- a/newctrl/container_windows.go +++ b/newctrl/container_windows.go @@ -39,10 +39,7 @@ func makeContainerWindowClass() error { func newContainer() *container { c := new(container) - hwnd := C.newContainer(unsafe.Pointer(c)) - if hwnd != c.hwnd { - panic(fmt.Errorf("inconsistency: hwnd returned by CreateWindowEx() (%p) and hwnd stored in container (%p) differ", hwnd, c.hwnd)) - } + c.controlSingleHWND = newControlSingleHWND(C.newContainer(unsafe.Pointer(c))) // don't set preferredSize(); it should never be called return c } @@ -61,12 +58,6 @@ func (c *container) parent() *controlParent { return &controlParent{c.hwnd} } -//export storeContainerHWND -func storeContainerHWND(data unsafe.Pointer, hwnd C.HWND) { - c := (*container)(data) - c.hwnd = hwnd -} - // 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. |
