Hi everybody!

Im having trouble with my code.. Im newbee in bitmaps and the function GetDIBits are failing, so can someone help? Thanks
Posted on 2005-09-23 23:49:17 by bimas
It display properly on my computer?
Posted on 2005-09-27 11:19:31 by roticv
i also can see a dialog with a red bitmap...

whats wrong?
Posted on 2005-09-27 14:38:57 by diablo2oo2
The bitmap should be covered by some black pixels, but the GetDIBits and SetDIBits is failing and I don't know to make them work.. I tried lots of things but nothing.. I put the writing code between COMMENT to test.. Funny is that the app works in win98, but not in win2k
Posted on 2005-09-27 21:12:04 by bimas
Use CreateDIBitmap if Im not mistaken. That function give you a pointer to the memory screen.
Posted on 2005-09-28 01:32:42 by realvampire
Or use something like this:

tagBmp BITMAP <>
invoke GetObject, hBitmap, SizeOf BITMAP , offset tagBmp

tagBmp.bmBits - pointer to the memory screen

Posted on 2005-09-29 07:24:07 by Bohdan
Thanks, it worked when I used GetObject and CreateDIBSection (or CreateDIBitmap). But can't I do this using just GetDIBits and SetDIBits directly? I think it could be faster if simple functions were called..
Posted on 2005-09-30 23:15:07 by bimas