# WS_THICKFRAME replacement

## Recommended Posts

Hello again. This question involves the resizing of a window. I currently have the settings below as the dwexstyle and dwstyle parameters of the CreateWindowEx() function.
dwexstyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
dwstyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX;

The problem is the window can be resized. I want the window to be locked at the specific size. After searching a bit I found that WS_THICKFRAME is the flag that allows resizing however taking this out leaves me with a window with no border. Is there a replacement that does not allow the window to be resized yet still look the same? I don't really want to deal with the windows resize message and then set the window back to the original. This is an alternative way to ensure the window is always the correct size but I would prefer not to do it this way. Thank you.

##### Share on other sites
If you take out WS_THICKFRAME, you'll still have a border around your window. The user just won't be able to resize it.

##### Share on other sites
Replace WS_THICKFRAME with WS_DLGFRAME.

The MSDN has this documented quite well, just press F1 in your Visual Studio once the cursor is on one of the style defines.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
627726
• Total Posts
2978816

• 10
• 9
• 21
• 14
• 12