Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#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
File Attachment(s):

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.054 seconds.