I’ve looked at everything in Google and the (outdated) MSDN for an example of loading a BMP from a Windows resource in support of my OpenGL screensaver, but no joy.
I’m getting error code 1814 back from GetLastError() after a CBitmap::LoadBitmap fails which is basically saying: “can’t find yer fargin resource in yer fargin EXE u knob”.
There is no obvious reason why it won’t load; the 256x256 BMP is happily imported in the resource file as IDB_BITMAP1 (ID 110 as it happens) but I’m ready to pull out what little hair I have left.
Does anyone have a cogent source example that works?
There’s something wrong with the NeHe tutorial that I have fixed in my own code. They get the actual bits for the bitmap from the bmBits variable in the BITMAP structure they receive from GetObject(). However, the bmBits pointer is always null. You have to use the GetDIBits() function.
[This message has been edited by Tokage (edited 01-26-2003).]