This is strange. I'm using code I've seen online.

Code:
m_bitmap = (HBITMAP)::LoadImage(0 ,pathname,IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
When I GetLastError, it returns #8, ERROR_NOT_ENOUGH_MEMORY. The pathname is "C:\\4by4bitmap.bmp". It is a 24 bit bitmap. I'm using Windows XP. I saw that someone online had a similar problem, but the website listed no solution.

Anyone have any ideas about this?