In the development of the Halcon window display, usually used HSmartWindowControl to view images and other objects. It can be quite troublesome to implement zooming using the mouse wheel.
Previously, I was writing my own code for zooming the screen. Dealing with the resizing of the window while using SetPart() made the whole things more complex.
It wasn’t until one day, I found HSmartWindowControl_MouseWheel in the object inspector.
According to the document, just need to add the HSmartWindowControl_MouseWheel event manually.
hSmartWindow1.MouseWheel += hSmartWindow1.HSmartWindowControl_MouseWheel;
It’s VERY Simple!!
Leave a Reply