LEADTOOLS Support
Imaging
Imaging SDK Questions
how to display the region on my own dialog
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, April 9, 2009 4:12:23 AM(UTC)
Groups: Registered
Posts: 16
hi,
i am using leadtools v13,and c++ class library.
in the Examples DEMO code
LAnimationWindow m_LAniWnd
when the region is REGION_TYPE_RECT
m_LAniWnd.SetToolType(TOOL_REGION);
m_LAniWnd.SetRegionType(REGION_TYPE_RECT);
m_LAniWnd.SetRgnFrameType(RGNFRAME_ANIMATED);
then do mosaic
m_LAniWnd.Dialog()->DoModalGetChange(m_hWnd,DLG_IMG_MOSAIC);
now i want the region can disply on my own dialog and to do something in the region on my own dialog.
Thanks very much,
wjh0574
#2
Posted
:
Thursday, April 9, 2009 5:59:18 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
I am not sure that I understood your requirement correctly. Do you mean that you want to display a region of your image on a new form you create? You can put our Bitmap Window control on your new form and copy the region data to the new Lead control on the new form.
If this is not what you want, please give me more details about your requirements. What exactly are you trying to do?
#3
Posted
:
Thursday, April 9, 2009 4:43:59 PM(UTC)
Groups: Registered
Posts: 16
in the leadtoos v13 DEMO code likes this
void CDemoView::OnRgnRectangle()
{
m_LAniWnd.SetToolType(TOOL_REGION);
m_LAniWnd.SetRegionType(REGION_TYPE_RECT);
m_LAniWnd.SetRgnFrameType(RGNFRAME_ANIMATED);
}
void CDemoView::OnImageMosaic()
{
m_LAniWnd.Dialog()->DoModalGetChange(m_hWnd,DLG_IMG_MOSAIC);
}
when the application run OnRgnRectangle() and select a rect region of a bitmap Image, then run OnImageMosaic(),pop up a Mosaic Dialog.In the Dialog left display originally redion(not display whole image) and right display after mosaic region(not display whole image).
Now,I want to do liks this.But I don't want to use the Mosaic Dialog that the leadtoos support.
I create a Dialog to display a region of a Image. so how can I get the region of a Image and display it.
Thanks very much,
wjh0574
#4
Posted
:
Sunday, April 12, 2009 1:06:11 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can take a copy of the region and put it in a new bitmap, then use this new bitmap for display in your dialog.
One way to do that is to create a new LBitmapWindow object (or LAnimationWindow), then use the following functions with it:
1. LBitmapBase::Create to create an empty bitmap the size of the region. You can obtain the region size using LBitmapRgn::GetRgnBounds. If the region is defined in an object called MyBitmap, you create the region object like this:
LBitmapRgn Region(&MyBitmap);
2. LBitmapBase::Fill to fill the new image with a suitable background color such as white.
3. LBitmapBase::Combine to copy the pixel data from the original image region to the new image.
LEADTOOLS Support
Imaging
Imaging SDK Questions
how to display the region on my own dialog
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.