diff options
Diffstat (limited to 'redo/window_windows.c')
| -rw-r--r-- | redo/window_windows.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/redo/window_windows.c b/redo/window_windows.c index 9cf0654..67a4440 100644 --- a/redo/window_windows.c +++ b/redo/window_windows.c @@ -60,20 +60,29 @@ DWORD makeWindowWindowClass(char **errmsg) return 0; } -HWND newWindow(LPWSTR title, int width, int height, void *data) +HWND newWindow(LPWSTR title, int width, int height, BOOL child, void *data) { HWND hwnd; + DWORD style; + HWND parent; + style = WS_OVERLAPPEDWINDOW; + parent = NULL; + if (child) { + style = WS_CHILD; + parent = msgwin; + } hwnd = CreateWindowExW( 0, windowclass, title, - WS_OVERLAPPEDWINDOW, + style, CW_USEDEFAULT, CW_USEDEFAULT, width, height, - NULL, NULL, hInstance, data); + parent, NULL, hInstance, data); if (hwnd == NULL) xpanic("Window creation failed", GetLastError()); - calculateBaseUnits(hwnd); + if (!child) + calculateBaseUnits(hwnd); return hwnd; } |
