[.net] Custom Class Click event

Started by
1 comment, last by Nibbles 16 years, 1 month ago
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
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.
Mike Popoloski | Journal | SlimDX
thanks, wndproc override seems to do the trick :)

This topic is closed to new replies.

Advertisement