GDI and DIBS

BlitzMax Forums/BlitzMax Programming/GDI and DIBS

TomToad(Posted 2008) [#1]
I'm trying to program some GDI functions. Been doing just fine so far until I got to the point of trying to render DIBs (Device Independent Bitmaps).
Here is the code so far. (sorry, very little is commented)

The problem is in the TBitmap.Create() function. I send it a pixmap and try to create a bitmap from it. But the CreateBitmap() function always returns a NULL.

Here is the MSDN entry for CreateBitmap()
http://msdn2.microsoft.com/en-us/library/ms532305(VS.85).aspx

Edit: fixed a bug in my code, but itwasn't related to the problem at hand.


TomToad(Posted 2008) [#2]
Well, I've managed to solve the problem by creating a new DIB and copying the pixel data one pixel at a time. However, i would like to find a way to create a DIB using the Pixmap directly so that I can alter a pixmap with GDI commands.



plash(Posted 2008) [#3]
Do a search on the forums, I think theres already a fairly developed GDI module.