I'm making a game in console application and I want to prevent user resizing and maximizing window. How can I do this using HWND?
I found solution. This code will disable window Size and Maximize box:
HWND consoleWindow = GetConsoleWindow();
SetWindowLong(consoleWindow, GWL_STYLE, GetWindowLong(consoleWindow, GWL_STYLE) & ~WS_MAXIMIZEBOX & ~WS_SIZEBOX);
来源:https://stackoverflow.com/questions/41172595/how-to-change-console-window-style-at-runtime