Click to See Complete Forum and Search --> : Maximize Minimize and Close buttons


Samar Aarkotti
April 20th, 1999, 09:00 AM
How do i disable the maximize ,minimize and the close buttons on the top right side of the window,

yash
April 20th, 1999, 10:02 AM
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.

Samar Aarkotti
April 20th, 1999, 10:07 AM
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....

yash
April 20th, 1999, 10:31 AM
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.