From c4f69d2af7d995eb0dd4592c18dc2f6b930bd193 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Oct 2013 11:20:12 +0200 Subject: Make window fixed size. --- plugingui/nativewindow_win32.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugingui/nativewindow_win32.cc') diff --git a/plugingui/nativewindow_win32.cc b/plugingui/nativewindow_win32.cc index 935cd04..89844da 100644 --- a/plugingui/nativewindow_win32.cc +++ b/plugingui/nativewindow_win32.cc @@ -320,6 +320,14 @@ GUI::NativeWindowWin32::~NativeWindowWin32() free(m_className); } +void GUI::NativeWindowWin32::setFixedSize(int width, int height) +{ + resize(width, height); + LONG style = GetWindowLong(m_hwnd, GWL_STYLE); + style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX); + SetWindowLong(m_hwnd, GWL_STYLE, style); +} + void GUI::NativeWindowWin32::resize(int width, int height) { SetWindowPos(m_hwnd, NULL, -1, -1, (int)width, (int)height, SWP_NOMOVE); -- cgit v1.2.3