15,980
社区成员




m_nMenuSel = MenuItemChecked(hWnd, point); // 判断是否点击文字。返回文字在数组中的索引
if(-1 != m_nMenuSel)
{
CMenu menu;
menu.LoadMenu(IDR_MENU2);
CMenu *pPopup = menu.GetSubMenu(m_nMenuSel);
CPoint ptMenu;
ptMenu.x = m_rcMenu[m_nMenuSel].left;
ptMenu.y = m_rcMenu[m_nMenuSel].bottom;
ClientToScreen(hWnd, &ptMenu);
//SetForegroundWindow(hWnd);
pPopup->TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_VERTICAL,ptMenu.x,ptMenu.y,NULL);
//SetFocus(hWnd);
return TRUE;
}