Original author: aircraft
Original link: https: //www.cnblogs.com/DOMLX/p/11773260.html
Because many times we have developed a tool such as drawing, mouse movement and the like, are just respond within the drawing area, upper left corner of the drawing area is the origin (0,0), the lower right corner is the length and width, so very convenient coordinates calculation, if the mouse moves across the winform interface has a response that will bring troubled times for developers.
So how simple it only in response OpenGLControl area mouse controls?
I think this c # interface development much better than the MFC
In c #, we just need to move the mouse to the edge of OpenGLControl controls, property right
Then in the right column click event property
Find the mouse inside message response function, and then double-click on it, in which we can enjoy to realize their ideas.
Test results: moving the mouse in the edit box to the right of the black OpenGLControl control area continue to coordinate print, no response to mouse movements in other regions
If you are interested to share technology exchange, it may be concerned about the public number, which will share from time to time various programming tutorials, and share source code, such as sharing research on c / c ++, python, front, back, opencv, halcon, opengl, machine depth study of learning class has knowledge about basic programming, image processing and machine vision development