Click to See Complete Forum and Search --> : CMiniFrameWnd system menu


Jörg Eckart
April 30th, 1999, 05:33 AM
Hello,

I have got a CMiniFrameWnd in my Application and want to know, how to get access to the system menu in the title bar. The method CWnd::GetMenu() obviously returns NULL but the method CWnd::GetSystemMenu(FALSE) also returns NULL. Does anybody know how to get access to the menu?

Thanks, Jörg

Playman Cheng
April 30th, 1999, 09:36 AM
Use CWnd::GetSysMenu(FALSE) is right,
try to find the error.

June 23rd, 1999, 12:24 PM
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->DeleteMenu(SC_MOVE, MF_BYCOMMAND); // example delete item
CString str; // how to add an item, you must map to the OnSysCommand where IDD_ABOUTBOX is nID
str.LoadString(IDD_ABOUTBOX);
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING,IDD_ABOUTBOX,str);
pSysMenu->EnableMenuItem(IDD_ABOUTBOX, MF_BYCOMMAND);

I don't have a log-in, Shepard Plowden