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:
Only windows that have the CS_DBLCLKS style can receive WM_LBUTTONDBLCLK messages, […]
So just add that flag to the ‘style’ member of the ‘WNDCLASS’ that you pass to ‘RegisterClass’ and it should start to work.
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);