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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, March 4, 2009 1:48:08 AM(UTC)
jackyzhang

Groups: Registered
Posts: 6


Hi,

I have a windows Imageviewer view image file , I want to add magglass to the Imageviewer, how can I use the L_StartMagGlass to implement it .
because the imageviewer.bitmap is a windows handle, and the second param of L_StartMagGlass is pBitmapHandle,
is there any way to convert the imageviewer.bitmap
to pBitmapHandle ?

I am using v16 c dll with delphi.

Thanks.

jacky
 

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.

#2 Posted : Wednesday, March 4, 2009 7:09:32 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You can not use our MagGlass functions on the Windows ImageViewer. To use our MagGlass functions, you need to have a LEADTOOLS BITMAPHANDLE that contains the image and use our painting functions to paint the loaded image on a Windows Device Context Handle (HDC).

This means if the image is in a disk file, you need to use the LEADTOOLS loading function to load it. If it's in some other object or image type, you need to convert it to a LEAD bitmap first.

 
#3 Posted : Thursday, March 5, 2009 3:01:45 AM(UTC)
jackyzhang

Groups: Registered
Posts: 6


hi
thanks for answer my question, and I has another question that is I want to use the method of press the keyboard "M" key always down to show the magnify glass , can you help me to implement this idea?

thanks.
 
#4 Posted : Thursday, March 5, 2009 7:09:49 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Unfortunately, you can not do that using the MagGLass, you can do that using the Zoom View functionality. There is a demo that shows how to use that. You can find the demo in this folder:

[LEADTOOLS 16]\Examples\CDLL\ZoomView
 
#5 Posted : Thursday, March 5, 2009 7:46:33 PM(UTC)
jackyzhang

Groups: Registered
Posts: 6


but the Zoom view's shape is rectangle, I want it's shape is circle.
 
#6 Posted : Monday, March 9, 2009 11:29:34 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


When starting the magglass, pass the MAGGLASS_MANUAL_UPDATE flag in the MAGGLASSOPTIONS.uMagGlassFlags property.  This will mean that the magglass will not automatically handle the mouse events and you are responsible for everything the magglass does.  

The documentation for the MAGGLASSOPTIONS has more details, but for the most part you will need to use the L_ShowMagGlass and L_SetMagGlassPos functions.  You should therefore be able to handle the mouse events and only show the magglass when the 'M' key is down.  There is an example in the help file showing how to use these functions.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.126 seconds.