Browse - Programming Tips - How can I convert a MFC OnLButtonDblClk call to a WM_LBUTTONDBLCLK message?

Date: 2014jul21
Language: C++
Framework: MFC
OS: Windows

Q.  How can I convert a MFC OnLButtonDblClk call to a WM_LBUTTONDBLCLK message?

A.  Use SendMessage and MAKELPARAM like this:

void CSomeTreeListCtrl::OnLButtonDblClk(UINT nFlags, CPoint point) { // ... GetParent()->SendMessage(WM_LBUTTONDBLCLK, nFlags, MAKELPARAM(point.x, point.y)); }