怎么使CListBox不响应鼠标事件
如何使CListBox不响应鼠标事件
如题
------解决方案--------------------
重载PreTranslateMessage函数
BOOL CDlgTestDlg::PreTranslateMessage(MSG* pMsg)
{
if( (pMsg-> message ==WM_LBUTTONDOWN || pMsg-> message ==WM_LBUTTONUP) && pMsg-> hwnd == m_list.m_hWnd )
{
return true;
}
return __super::PreTranslateMessage(pMsg);
}
如题
------解决方案--------------------
重载PreTranslateMessage函数
BOOL CDlgTestDlg::PreTranslateMessage(MSG* pMsg)
{
if( (pMsg-> message ==WM_LBUTTONDOWN || pMsg-> message ==WM_LBUTTONUP) && pMsg-> hwnd == m_list.m_hWnd )
{
return true;
}
return __super::PreTranslateMessage(pMsg);
}