End Google Ads 201810 - BS.net 01 --> Hi, I am developing a document/view program with MFC Ribbon Features, I want to disable the close button of some of DockablePanes so that the user could not close them. I use the following code But It didnot work what should I do?
CMenu* pm = m_wndObjectProperties.GetSystemMenu(FALSE);

if(pm!= NULL)
{
pm->DeleteMenu(1, MF_BYPOSITION);
pm->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_DISABLED);
pm->DeleteMenu(SC_CLOSE, MF_BYCOMMAND);
}