I want to disable/grey a system menu button on the console window, particularly the minimize button. I've tried functions mentioned on another thread, but even after using them, the console window still doesn't have the minimize button grayed out. I have also looked into the DeleteMenu() function, but it doesn't seem to have the option to grey out buttons.
Here's the test code:
#include <Windows.h>
using namespace std;
int main()
{
//SetConsoleTitle(L"CPU Information");
HWND consoleWindow = GetConsoleWindow();
HMENU hMenu = GetSystemMenu(consoleWindow, FALSE);
EnableMenuItem(hMenu, SC_MINIMIZE, MF_BYCOMMAND | MF_GRAYED);
DrawMenuBar(consoleWindow);
return 0;
}