Dave's Brain

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)); }

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.