Can you please tell me how to use BitBlt function to draw into Image from HBITMAP. I try to use below code and image always black, what is wrong? Or maybe you know how to draw into your image from HBITMAP without intermediate data
Gdiplus::Bitmap* pBitmap = Gdiplus::Bitmap::FromFile( fullName );
if ( !pBitmap )
return;
HBITMAP hbmp;
Gdiplus::Status status = pBitmap->GetHBITMAP( Color::Red, &hbmp );
int iWidth = pBitmap->GetWidth();
int iHeight = pBitmap->GetHeight();
HRESULT hr = m_image->Init->Image( iWidth, iHeight );
hr = m_image->Fill->ByColor( 0xff00ff ); //just for test
CComVariant var;
var = (long)hbmp;
//hr is S_OK, but image is black.
hr = m_image->View->BitBlt( 0, 0, iWidth, iHeight, 0, 0, ToImage, var );
BitBlt usage
Started by Guest_Kite_*, Dec 24 2007 06:57 PM
1 reply to this topic
#2
Posted 25 December 2007 - 11:26 AM
Hello,
Unfortunately we don't know methods to draw into VIMAS Image from HBITMAP without intermediate data. HBITMAP is a device-dependent storage format, so data should be converted to device-independent form before the the using.
Best regards.
Alex Murovany.
VIMAS Technologies, product manager.
www.vimas.com/ve_imm.htm
Unfortunately we don't know methods to draw into VIMAS Image from HBITMAP without intermediate data. HBITMAP is a device-dependent storage format, so data should be converted to device-independent form before the the using.
Best regards.
Alex Murovany.
VIMAS Technologies, product manager.
www.vimas.com/ve_imm.htm
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












