I'm trying to make a simple 2D game, and the program worked fine so far. I use full screen in 16 bits, with 4 different sprites. (and some 20 ships on screen) I checked RAM usage before, and the program uses 1 MB of memory (always).
Now I want to use double-buffering, and therefore I tried to create a back screen buffer (using win32 api only) with:
hbmBuffer = CreateCompatibleBitmap(m_hdc, rect.right, rect.bottom);
This function call fails (returns a NULL pointer) due to unavailable memory. This call requires -at the most- 1.2 MB RAM, I have plenty more. I believe it's due to a setting problem related to Visual C++ 6. What should I change?