The code removing all of the three buttons on the title-bar and removing the scroll-bar I use in "Windows 7" so far is listed:
#define WINVER 0x0501 // WinXP and UP
#include <windows.h>
int main ( void )
{
//Get a console handle
HWND ConsoleWindow = GetConsoleWindow();
//Change Settings
SetWindowLong (ConsoleWindow, GWL_STYLE, WS_THICKFRAME);
SetWindowLong (ConsoleWindow, GWL_STYLE, WS_CAPTION);
SetWindowPos (ConsoleWindow, HWND_TOPMOST, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_SHOWWINDOW);
//Resize
system ("mode con cols=75 lines=50");
system ("pause>nul");
return 0;
}
Compiling Command:
mingw32-gcc.exe -c "Console_Graphing_10.c" -o "Console_Graphing_10.o"
mingw32-gcc.exe -o "Console_Graphing_10.exe" "Console_Graphing_10.o"
But this cannot remove all of the three buttons on the title-bar and remove the scroll-bar in "Windows XP"
Is there any better code to achieve this goal? Thanks.
You can try this:
all buttons will be removed:
I found This after my comment saying I thought it was not possible...
Note: When compiling for 32-bit Windows, SetWindowLongPtr is defined as a call to the SetWindowLong function. So, should work with either Windows 7, or with XP (did not test)
Test image: