OnLButtonDown 和 OnLButtonUp 联动响应


void CTestDlg::OnLButtonDown(UINT nFlags, CPoint point) {
    
    m_curSor.x = 100;
    m_curSor.y = 100;
    MOUSEEVENT mse(MOUSEEVENTF_LEFTDOWN, m_curSor, 0);
    m_event.RespondMEvent(&mse);
}

void CTestDlg::OnLButtonUp(UINT nFlags, CPoint point) {
    AfxMessageBox("success");
}

m_event.RespondMEvent(&mse) 调用了 SetCursorPos() 和 mouse_event()函数。

问题:当鼠标左键单击时,只响应了OnLButtonDown,没有响应OnLButtonUp;
注:注释掉 m_event.RespondMEvent(&mse) 这句,Down 和 Up 都能响应。