LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Load two bitmap file into one canvas control

Hello ,

In my panel there is just one canvas contrl , now want to place 2 bitmaps into it , hope place one to the left and the other one to the right of the control , can it be dong ?


David
0 Kudos
Message 1 of 3
(2,981 Views)
Hay davidLee,

why don't you put the two bitmaps into one bitmap, so can display them?
Or use two canvas to display them?
0 Kudos
Message 2 of 3
(2,967 Views)
David,

You can display as many bitmaps in a single canvas as you like. The CanvasDrawBitmap function allows you to specify a destination rect, as well as a source rect. Presumably you'd want the source rect to be the entire bitmap (VAL_ENTIRE_OBJECT), but you can vary the destination such that one bitmap would go to the left side of the canvas, and the other would go to the right side of the canvas. Also, the destination rects don't have to be the same size as the source rect. If they're not the same size, the bitmap will be stretched to fit in the destination rect.

Luis
NI
0 Kudos
Message 3 of 3
(2,959 Views)