Hiding System Menu

This is a discussion on Hiding System Menu within the Windows Programming forums, part of the Platform Specific Boards category; Somebody please help to hide the system menu bar. My program is created by Win32 Console Application(Visual C++, Microsoft)....

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    6

    Hiding System Menu

    Somebody please help to hide the system menu bar. My program is created by Win32 Console Application(Visual C++, Microsoft).

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    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.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    6
    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.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    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]

  5. #5
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    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.
    You can disable those buttons too, in the resource editor.
    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.

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    6
    You can disable those buttons too, in the resource editor.
    no resource editor in Win32 Console Application but there is one in Win32 Application. i'm using Microsoft Visual C++(Visual Studio 6.0).

  7. #7
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    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.

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    6

    yes

    yes, it's a console program.

  9. #9
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What I've got so far, creating a menu system:
    By Shamino in forum Game Programming
    Replies: 4
    Last Post: 06-15-2007, 03:03 AM
  2. Replies: 4
    Last Post: 06-13-2005, 09:03 AM
  3. Replies: 3
    Last Post: 06-13-2005, 07:28 AM
  4. Why Can't C++ Be Used to Develop Operating System?
    By Antigloss in forum C++ Programming
    Replies: 7
    Last Post: 05-27-2005, 06:16 AM
  5. quick question about C Dos text menu pgm i was doing
    By Shadow in forum C Programming
    Replies: 2
    Last Post: 09-16-2001, 10:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21