BOOL CDlgMediaPlay::PreTranslateMessage(MSG* pMsg) 
{
if(WM_RBUTTONDOWN == pMsg->message)
{
AfxMessageBox("123");
return TRUE;
}
else
return CDialog::PreTranslateMessage(pMsg);
}
以上程序可以实现我点右键就跳出"123"对话框
但我现在是如果点右键的话只要返回就行了
那就是把afxmessagebox("123")去掉
但是去掉了右键就又有用了????
请问该如何屏蔽啊?
谢谢

解决方案 »

  1.   

    不会的
    BOOL CTest6Dlg::PreTranslateMessage(MSG* pMsg) 
    {
    if(WM_RBUTTONDOWN == pMsg->message)
    {
    // AfxMessageBox("123");
    return TRUE;
    } return CDialog::PreTranslateMessage(pMsg);
    }void CTest6Dlg::OnRButtonDown(UINT nFlags, CPoint point) 
    {
             AfxMessageBox("123");

    CDialog::OnRButtonDown(nFlags, point);
    }这样是不会弹出123的。
      

  2.   

    if(WM_RBUTTONDOWN==pMsg->message)
    return TRUE;
    else if(WM_RBUTTONUP==pMsg->message)
           return TRUE;两个都屏蔽掉