BOOL CTxtrRaderDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if ( pMsg->message==WM_CONTEXTMENU)
{
CPoint point;
GetCursorPos(&point);
RECT rect;
GetWindowRect(&rect);
menu.TrackPopupMenu(TPM_RIGHTALIGN,point.x+rect.left,point.y+rect.top,this,NULL);
}
return CDialog::PreTranslateMessage(pMsg);
}
改代码捕获到长按左键后,弹出菜单