LEADTOOLS Support
Imaging
Imaging SDK Questions
how to use LRasterPaintWindow and LBitmapWindow together?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, December 17, 2006 6:04:10 AM(UTC)
Groups: Registered
Posts: 11
CWnd m_ImgWnd;
LBitmapWindow m_LeadImgWnd;
LRasterPaintWindow * m_RasterPntWnd;
m_LeadImgWnd.Create(_T("STATIC"), _T(""), WS_CHILD | WS_VISIBLE,
CRect(0, 0, 300, 300), this, 1234);
m_BitmapImg.SetWndHandle(m_ImgWnd.m_hWnd);
m_BitmapImg.SetFileName(TEXT("F:\\LeadTool_Study\\HowTO\\Lead15\\mm.bmp"));
m_BitmapImg.Load();
int res
m_RasterPntWnd = new LRasterPaintWindow;
res = m_RasterPntWnd->Initialize();
res = m_RasterPntWnd->SetBitmap( &m_BitmapImg );
res = m_RasterPntWnd->SetWndHandle( m_LeadImgWnd.GetSafeHwnd() );
m_BitmapImg.SetPatternBackColor(RGB(255,247,220));
m_BitmapImg.EnableAutoScroll(FALSE);
m_BitmapImg.SetZoomMode(ZOOM_FIT);
m_BitmapImg.Paint();
my question:Can I write code like this res = m_RasterPntWnd->SetBitmap( &m_BitmapImg );?
but it can not display the image.only m_BitmapImg.SetPatternBackColor(RGB(255,247,220)); works.
#2
Posted
:
Monday, December 18, 2006 6:53:15 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can pass a LBitmapWindow object to
LRasterPaintWindow::SetWndHandle because it's derived from LBitmapBase.
However, the bitmap should be drawn in the RasterPaint window, not the
LBitmapWindow itself.
LEADTOOLS Support
Imaging
Imaging SDK Questions
how to use LRasterPaintWindow and LBitmapWindow together?
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.