I am using MS devstudio 5 for NT 4.0 and I am having
problems handling simple bitmaps (256 colors). What should
be simple is taking me longer and longer to accomplish
as I get deeper and deeper in this mess of BITMAP, HBITMAP
BITMAPHEADERINFO and such...
What I am trying to do is simply to load a bitmap from file
and display it. And the reverse, storing it in a file.
(why is there no such thing as a CBitmap::WriteToFile()!!!)
Any how, this code shows the problem:
*h= CreateDIBitmap(m_dcMem, &bmih, CBM_INIT, lpvBits, (BITMAPINFO*)lpmi, DIB_RGB_COLORS);
tsize1= px->GetBitmapBits( (bmfh.bfSize - bmfh.bfOffBits), lpvBits );
h is a HBITMAP *. The problem is that tsize1 is only 67000
and NOT the expected (bmfh.bfSize - bmfh.bfOffBits) which
is more like 670000! What's wrong????
Is there a CBitmap toolkit or a derived class complete
with manipulation tools such a write/read and
copy to/from clipboard???? Can you provide references?
Is it free and does it work???
HELP... I am getting desperate!!!