Disable Window Resizers?

Miscellaneous Forums/Win32 Discussion/Disable Window Resizers?

I want to prevent my window from being resized. I have created it such that it does not have a minimize button or a maximize button, and both maximize and minimize are greyed out on the window menu, so that's all good. However, if I mouse over the edges of the window, I get the little resizing cursor which tells me I can drag the window to resize it. Now I can probably grab a WM_ windowmessage which tells me that this happened and force it back tothe correct size, but this is not a user friendly behaviour. A more friendly behaviour would be to indicate clearly that it's not possible.

Is there a way to prevent the resizing cursor displaying and therefore stop the window being resized in this way in the first place? I'm sure I've used programs which do this.

Apparently it's the Window Style WS_THICKFRAME which determines whether or not a window can be resized. If there's anything else I need to do, I haven't managed to find it yet, but that seems to be working.

Local hWnd = QueryGadget(Window, QUERY_HWND)
Local x = Win32_GetWindowLong(hWnd, GWL_STYLE)
x :&~ WS_THICKFRAME
Win32_SetWindowLong(hWnd, GWL_STYLE, x)


PLEASE MAKE A NOTE:
The "Win32_GetWindowLong()" and "Win32_SetWindowLong()" commands are not the names of the real user32.dll commands.