I have a bitmap defined in my resource.h and .rc file:
#define IDB_BITMAP1 130
IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
When I try to load it with
hBMP = LoadBitmap(0, MAKEINTRESOURCE(IDB_BITMAP1));
it fails, and GetLastError() returns 1814 (or 0x716 in hex), which stands for ERROR_RESOURCE_NAME_NOT_FOUND. But the bitmap is there. Is it because of the hInstance? I thought that 0 works if the resource is in the .exe, and it is.