MFC中怎么添右键弹出菜单

MFC中如何添右键弹出菜单
我正在看孙鑫老师的《VC++深入详解》的视屏,里面有个添加右键弹出菜单的功能,是在VC6.0中实现的,步骤是点击“add to project-->conpents and control-->popup menu"就自动添加了一个右键弹出菜单,但我现在用的是VS2008,好象很多东西不一样,根本找不到这些步骤,请高手指教,另外还有其他方法吗?

------解决方案--------------------
建立一个MENU资源IDR_MENU1
在OnRButtonDown函数下实现
C/C++ code

CMenu menu;
    menu.LoadMenu(IDR_MENU1);
    CMenu* pPopup = menu.GetSubMenu(0);

    ClientToScreen(&point);
    pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,GetParent());

------解决方案--------------------
现在资源里编译一个菜单
为窗口添加WM_RBUTTONDOWN处理函数
函数里面
CMenu menu,*popmenu;
//装在菜单,资源ID为IDR_POPMENU——你编辑的菜单的ID
menu.LoadMenuW(IDR_POPMENU)
pop = menu.GetSubMenu(0);
CPoint myPoint;
GetCursorPos(&myPoint); //鼠标位置
pop->TrackPopupMenu(TPM_LEFTALIGN,myPoint.x,myPoint.y,this);
------解决方案--------------------
不要去找这个组件了 ,直接响应你要添加弹出菜单的窗口的OnContextMenu 

然后添加一下下面的代码就行了: 

C/C++ code
void CMyF1Dlg::OnContextMenu(CWnd* pWnd, CPoint point) 
{
    // CG: This block was added by the Pop-up Menu component//Pop-Up Menu在代码上就添加了下面的这段
    {
        if (point.x == -1 && point.y == -1){
            //keystroke invocation
            CRect rect;
            GetClientRect(rect);
            ClientToScreen(rect);

            point = rect.TopLeft();
            point.Offset(5, 5);
        }

        CMenu menu;
        VERIFY(menu.LoadMenu(CG_IDR_POPUP_ABOUT_DLG));

        CMenu* pPopup = menu.GetSubMenu(0);
        ASSERT(pPopup != NULL);
        CWnd* pWndPopupOwner = this;

        while (pWndPopupOwner->GetStyle() & WS_CHILD)
            pWndPopupOwner = pWndPopupOwner->GetParent();

        pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
            pWndPopupOwner);
    }
}