米度软件:www.midosoft.cn
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
//获取系统菜单
CMenu *pMenu = GetSystemMenu(FALSE);
//取得系统菜单数量
int Count = pMenu->GetMenuItemCount();
//取得关闭菜单的ID
UINT ID = pMeun->GetMenuItemID(Count-1);
//禁止关闭菜单,同时禁止关闭按钮
pMeun->EnableMenuItem(ID,MF_GRAYED);
return;
}
米度软件:www.midosoft.cn