diff options
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. |
