summaryrefslogtreecommitdiff
path: root/redo/window_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/window_windows.go')
-rw-r--r--redo/window_windows.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/redo/window_windows.go b/redo/window_windows.go
index 43a7631..1ac294a 100644
--- a/redo/window_windows.go
+++ b/redo/window_windows.go
@@ -35,7 +35,11 @@ func makeWindowWindowClass() error {
return nil
}
-func newWindow(title string, width int, height int) *window {
+type controlParent interface {
+ setParent(C.HWND)
+}
+
+func newWindow(title string, width int, height int, control Control) *window {
w := &window{
// hwnd set in WM_CREATE handler
closing: newEvent(),
@@ -49,6 +53,8 @@ func newWindow(title string, width int, height int) *window {
if hresult != C.S_OK {
panic(fmt.Errorf("error setting tab background texture on Window; HRESULT: 0x%X", hresult))
}
+ w.child = control
+ w.child.setParent(w.hwnd)
return w
}