On the Left mouse button click, at the click point we have to display the
popup menu...
void CMyDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
m_PopupMenu.LoadMenu(IDR_POPUP);
CMenu* pSub = m_PopupMenu.GetSubMenu(m_iMenuIndex);
ClientToScreen(&point);
TrackPopupMenu(pSub->GetSafeHmenu(), TPM_LEFTALIGN |
TPM_LEFTBUTTON, pt.x, pt.y, NULL, m_hWnd, NULL);
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment