• Advertisement
Sign in to follow this  

opengl mfc (solved)

This topic is 4235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i have my opengl window working in my mfc application, but now i need to be able to detect mouse clicks on the opengl window, which is being displayed through a static control, no matter what i have tried i caan not get anyting to detect the mouse when it is over the opengl window, any help would be great, Thanks in advance. [Edited by - Ultraseamus on July 21, 2006 4:41:53 PM]

Share this post


Link to post
Share on other sites
Advertisement
I've never used a static control for this (usually I use a picture control) but that shouldn't really affect this problem. Have you tried overriding the windows messages for mouse movement, buttons, etc.?

You should probably just have to override the WM_MOUSEMOVE, WM_LBUTTONDOWN, and maybe WM_LBUTTONUP messages, do your handling there and good ol' Bill will take care of the rest for you.

Share this post


Link to post
Share on other sites
yah, sorry i meant picture control, and if by override the mouse move message you just mean using this function:

void CoglMFCDialogDlg::OnMouseMove(UINT nFlags, CPoint point)
{
CWnd::OnMouseMove(nFlags, point);
}

then yah that is what i am trying, but the function does not get called when i move the mouse over the opengl window. If you were suggesting something more then that then i am missing something.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement