Jump to content
  • Advertisement
Sign in to follow this  
Nibbles

[.net] Custom Class Click event

This topic is 3850 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

hi, i'm using the following article's method to have an opengl display on a form: OpenGL on a windows form however, i'm not sure how i can add an mouseclick or mousemove even to that opengl view. it's not the same as clicking on the form. thanks, Scott

Share this post


Link to post
Share on other sites
Advertisement
You are going to have to override the WndProc method and handle the events yourself, essentially creating a Win32 window procedure.

The way the article is creating its window (deriving from NativeWindow), you basically lose a ton of .NET support for windows. I haven't studied it in depth for OpenGL, but you could probably derive from Form instead and still retain all of the cool features.

I know you can do this for DirectX; I would be surprised if you could not for OpenGL.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!