add support for non-resizable windows

This commit is contained in:
StapleButter
2017-10-02 23:26:25 +02:00
parent f8b63759f7
commit dad0e6b6e8
5 changed files with 10 additions and 7 deletions

View File

@ -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,