CMiniFrameWnd system menu
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
Re: CMiniFrameWnd system menu
Use CWnd::GetSysMenu(FALSE) is right,
try to find the error.
Re: CMiniFrameWnd system menu
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