CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    13

    Maximize Minimize and Close buttons

    How do i disable the maximize ,minimize and the close buttons on the top right side of the window,



  2. #2
    Join Date
    May 1999
    Location
    Houston - TX - US
    Posts
    29

    Re: Maximize Minimize and Close buttons

    Hi ,
    In the InitInstance fun have somthing like this.

    CMenu * pMenu = m_pMainWnd->GetSystemMenu( FALSE );
    pMenu->EnableMenuItem( SC_CLOSE, MF_DISABLED ) ;
    pMenu->EnableMenuItem( SC_MAXIMIZE, DISABLED ) ;
    pMenu->EnableMenuItem( SC_MINIMIZE, DISABLED ) ;


    m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();


    hope this helps U.

    Good Luck.
    Yash.







  3. #3
    Join Date
    Apr 1999
    Posts
    13

    Re: Maximize Minimize and Close buttons

    I am sorry if i meant the system MenuItem's but its not that ... i meant the buttons to the Top right of the window..... the symbols( - [] X) ... i wanted to disable them....

    thanks in Advance....


  4. #4
    Join Date
    May 1999
    Location
    Houston - TX - US
    Posts
    29

    Re: Maximize Minimize and Close buttons

    Hi,
    that code is for disabling the top-right buttons ! U call it system menu or anything! with that code , both the Top-right n top-Left icon menu items too will be disabled .

    Yash.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured