woaidongmao

文章均收录自他人博客,但不喜标题前加-[转贴],因其丑陋,见谅!~
随笔 - 1469, 文章 - 0, 评论 - 661, 引用 - 0
数据加载中……

Menu 操作

PopMenu

void CTransferAgentAccountDlg::OnRclickListAgentAc(NMHDR* pNMHDR, LRESULT* pResult)
{
    POSITION pos;
    CMenu popmenu, *psubMenu = NULL;
    CPoint oPoint;
    pos = m_ListAgent.GetFirstSelectedItemPosition();
    if(!pos)
    {
        return;
    }
    GetCursorPos( &oPoint);
    popmenu.LoadMenu(IDR_MENU_AGENT);
    psubMenu = popmenu.GetSubMenu(0);
    psubMenu->TrackPopupMenu(TPM_LEFTALIGN, oPoint.x, oPoint.y, this);
    *pResult = 0;
}

delete menu

psubMenu->DeleteMenu(ID_MEMU_FIFO_IB_ADD, MF_GRAYED);
psubMenu->DeleteMenu(ID_MEMU_FIFO_IB_DELETE, MF_GRAYED);
psubMenu->DeleteMenu(ID_MEMU_FIFO_IB_EDIT, MF_GRAYED);

 

enable menu

psubMenu->EnableMenuItem(ID_MEMU_FIFO_IB_VIEW, MF_GRAYED);

posted on 2008-05-06 16:03 肥仔 阅读(413) 评论(0)  编辑 收藏 引用 所属分类: MFC存档


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理