This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, June 12, 2013 5:58:13 AM(UTC)
Groups: Registered
Posts: 256
The attached project uses LEADTOOLS v18 C++ Class Library functions to zoom in and out of the image according to the mouse pointer position using the mouse wheel.
The project uses SetToolType() function to zoom in and out by passing TOOL_ZOOM_ON_MOUSECLICK to the function.
Since TOOL_ZOOM_ON_MOUSECLICK only respond to the Mouse click, in the mouse wheel event the following will happen:
1- The wheel value is checked to see if it is a zoom in or zoom out operation.
2- The current mouse tool is saved into a variable.
3- The zoom tool is selected using "TOOL_ZOOM_ON_MOUSECLICK".
4- The mouse X and Y coordinates are converted from the screen coordinates to the demo's window.
5- A windows message is sent to simulate left-click or right-click depending on the required action (zoom in or zoom out).
6- The old tool is selected again.
To enable centering the zoom, LBitmapWindow::EnableCenterOnZoom property is set to ture.
Note: This is a modified version of our LoadSave demo, so in order to make it work without changing any paths, extract it to [LEADTOOLS 18]\Examples\ClassLibrary\MSVC
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.