LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a picture size which is inserted in a canvas ?(cvi 6.0)

Hello,
I have some questions about cvi canvas usage to ask:
1>how to get the size and position of a picture has instered to a canvas ?

2>Is there any way to realize drag a picture from a window to the current panel's canvas ?

3>How to move a picture with mouse in a canvas ?

Thanks .

David
0 Kudos
Message 1 of 2
(2,989 Views)
David,

Here are some pointers that can help you in your application:

1) The canvas control is just an arbitrary drawign surface that does not keeps track of the objects inserte into it. There for you need to get that information before you insert it into the canvas. Take a look at the GetBitmapData function.

2) If you want to implement some sort of drag-and-drop in your own application the is just a matter of catching the user events and display draw the image in the canvas, as far as getting the state of the mouse there is a good example that ships with CVI about this.

3) my advice here is to use the CanvasScroll function this will alloe you to move the content of the canvas arroud based on the mouse movement.

I hope this helps.

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,989 Views)