From dad0e6b6e85f0845b7437e33974f061283f28ecc Mon Sep 17 00:00:00 2001 From: StapleButter Date: Mon, 2 Oct 2017 23:26:25 +0200 Subject: add support for non-resizable windows --- src/libui_sdl/libui/windows/window.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/libui_sdl/libui/windows/window.cpp') diff --git a/src/libui_sdl/libui/windows/window.cpp b/src/libui_sdl/libui/windows/window.cpp index e126efc..44fb306 100644 --- a/src/libui_sdl/libui/windows/window.cpp +++ b/src/libui_sdl/libui/windows/window.cpp @@ -512,7 +512,7 @@ static void setClientSize(uiWindow *w, int width, int height, BOOL hasMenubar, D logLastError(L"error resizing window"); } -uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) +uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar, int resizable) { uiWindow *w; WCHAR *wtitle; @@ -525,8 +525,11 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar) hasMenubarBOOL = TRUE; w->hasMenubar = hasMenubarBOOL; -#define style WS_OVERLAPPEDWINDOW -#define exstyle 0 + int style = WS_OVERLAPPEDWINDOW; + int exstyle = 0; + + if (!resizable) + style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX); wtitle = toUTF16(title); w->hwnd = CreateWindowExW(exstyle, -- cgit v1.2.3