LEADTOOLS Support
General
General Questions
Copy content from one control to another
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, July 27, 2012 4:10:53 AM(UTC)
Groups: Registered
Posts: 6
Hello,
I’m still using version 12 with visual C++.
Is ther a way, to copy the content of one leadcontrol to anohther?
An operator „=“ isn’t available.
I’m using: LeadA.SetBitmap(LeadB.GetBitmap());
This works fine. But it’s very slow with big pictures. Actually it’s even faster if I save from LeadB to a file and open thar file from LeadA.
Is there a better and faster way of cloning a control?
Thank you,
#2
Posted
:
Sunday, July 29, 2012 12:35:04 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
If you're using the LEAD Main OCX, the Set/Get bitmap approach is the direct way of making a full copy of the bitmap. It would be really strange if saving to file then loading would produce an overall faster performance.
Another way of doing it is this:
1. Create an empty bitmap in the second control that's the same dimensions and bits per pixel as the original. By default, the new image would be all black (zeros).
2. Copy the pixel data from the first to the second using the Combine() function using the CB_OP_ADD flag.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
General
General Questions
Copy content from one control to another
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.