Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: opengl and mfc-dialog

  1. #1
    Guest

    opengl and mfc-dialog

    Hello,

    I have a code that renders opengl inside a static control in the MFC Dialog box.

    How can i handle mouse events, like mouse wheel and exact points of left/right button clicks etc. ??

    please give me some pointers here.. i have looked at the STN_CLICKED notifications (SS_NOTIFY) from the static control, but that doesnt seem to do much ?!!!!

    pls help!

    :-(
    niranjan

  2. #2

    Re: opengl and mfc-dialog

    Simple just put your events like OnMouseMove(...) in your CxxxxDlg class. For the mouse position translate/map to and from the OpenGL window coordinates to mouse (static control)coordinates. I wasn't cleaver enough to query Windows for the control dimensions and location so I had to "calibrate" or eyeball the coefficients for the linear mapping.

  3. #3
    Guest

    Re: opengl and mfc-dialog

    Thank You for youe help. I will try it out


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •