How can identify Mouse Click event in PreTranslateMessage?

安稳与你 提交于 2019-12-10 23:20:13

问题


I want identify all mouse click event in PreTranslateMessage, but when I use WM_LBUTTONDOWN than WM_LBUTTONDBLCLK portion never called. Please tell me how can I identify all events separately.


回答1:


This code will get the mouse click events in PreTranslateMessage

 BOOL CSampleDlg::PreTranslateMessage(MSG* pMsg)
 {
    if(pMsg->message == WM_LBUTTONDOWN)
    {
      //add ur customized code here...
      return false;
    }
    return CDHtmlDialog::preTranslateMessage(pMsg);
 }


来源:https://stackoverflow.com/questions/7411415/how-can-identify-mouse-click-event-in-pretranslatemessage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!