Win32清除所有系统菜单
CMenu* pMenu = pWnd->GetSystemMenu(FALSE);
if (pMenu != NULL)
{
pMenu->EnableMenuItem(SC_CLOSE, MF_DISABLED);
int nItemCount = pMenu->GetMenuItemCount();
printf("menucnt=%d\n", nItemCount);
{
CMenu* pSubMenu = pMenu->GetSubMenu(nItemCount);
if (pSubMenu != NULL)
{
int nSubItemCount = pMenu->GetMenuItemCount();
printf("menucnt=%d\n", nSubItemCount);
while (pSubMenu->RemoveMenu(0, MF_BYPOSITION));
}
while (pMenu->RemoveMenu(0, MF_BYPOSITION));
}