aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/windows/window.cpp
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-10-02 23:26:25 +0200
committerStapleButter <thetotalworm@gmail.com>2017-10-02 23:26:25 +0200
commitdad0e6b6e85f0845b7437e33974f061283f28ecc (patch)
treef646b8528b3de0ca90c230c862f40e832f4a45dc /src/libui_sdl/libui/windows/window.cpp
parentf8b63759f722be1f2ae0156bea6957a739c1bb6f (diff)
add support for non-resizable windows
Diffstat (limited to 'src/libui_sdl/libui/windows/window.cpp')
-rw-r--r--src/libui_sdl/libui/windows/window.cpp9
1 files changed, 6 insertions, 3 deletions
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,