Somebody please help to hide the system menu bar. My program is created by Win32 Console Application(Visual C++, Microsoft).
Somebody please help to hide the system menu bar. My program is created by Win32 Console Application(Visual C++, Microsoft).
I believe you can select "No system menu" (or something similar) in the resource editor.
By system menu, you mean the popup menu that appears when you right click on the upper most left of the window?
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
nope. it's the upper most right of the window. three small boxes, maximise, minimise and the X(Close). i don't want those things in my console application.
Run it in full screen mode. You can switch to this in the code.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
You can disable those buttons too, in the resource editor.Originally posted by C4Code
nope. it's the upper most right of the window. three small boxes, maximise, minimise and the X(Close). i don't want those things in my console application.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
no resource editor in Win32 Console Application but there is one in Win32 Application. i'm using Microsoft Visual C++(Visual Studio 6.0).You can disable those buttons too, in the resource editor.
It's a console program? Sorry, didn't see that...
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
yes, it's a console program.
Here is a snippet from my code,
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle,WS_EX_TOPMOST|WS_EX_DLGMODALFRAME,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
DWORD dwStyle = GetWindowLong(hWnd, GWL_STYLE);
// no caption bar, no system menu
dwStyle &= ~(WS_CAPTION|WS_SIZEBOX);
SetWindowLong(hWnd, GWL_STYLE, dwStyle);
// force a repaint
InvalidateRect(hWnd, NULL, TRUE);
SetWindowPos(hWnd, HWND_TOPMOST, 0, 20, 50, 50, SWP_NOMOVE|SWP_SHOWWINDOW);
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
I've got the idea from here
I wonder if you can adapt this for console mode, but that's at least an idea
Have a nice code!
Last edited by Carlos; 10-08-2002 at 10:20 AM.
[R]evolution!
Programming related articles, downloads, demos