Has anyone ever got a double-click event from an OpenGL window? I have ON_WM_LBUTTONDBLCLK() in my BEGIN_MESSAGE_MAP section, and a function to handle the event:
CPolyView::OnLButtonDblClk(UINT nFlags, CPoint point)
But it never gets called. Other mouse events (single-click, mouse move) work fine.
Originally posted by samv:
So just add that flag to the ‘style’ member of the ‘WNDCLASS’ that you pass to ‘RegisterClass’ and it should start to work.
Thanks. I don’t call RegisterClass at all, but I found a way to make it work by adding these lines to OnCreate() for the OpenGL window:
long lStyle = GetClassLong(m_hWnd,GCL_STYLE);
SetClassLong(m_hWnd,GCL_STYLE,lStyle | CS_DBLCLKS);
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.