//在Tree内:
void DIALOG1::OnRclickTree1(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
LPPOINT lpoint=new tagPOINT;
::GetCursorPos(lpoint); //获得鼠标
CMenu menu,*pSubMenu;
menu.LoadMenu(IDR_MENU2); //添加菜单资源
pSubMenu=menu.GetSubMenu(0); //设置菜单弹出项目起始位置
pSubMenu->TrackPopupMenu(TPM_LEFTALIGN,lpoint->x,lpoint->y,this); //获得鼠标位置
*pResult = 0;
}