EDIT: I've added a few more lines of the program to the code snippet below.
I have the following line of code in a program
BITMAP BMP;
HBITMAP hBMP;
hBMP = (HBITMAP)LoadImage(GetModuleHandle(NULL), "Test.bmp", IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE);
if (!hBMP) return 1;
GetObject(hBMP, sizeof(BMP), &BMP);
and when I run the program, it crashes. I used GetLastError(), which returned 2/FILE_NOT_FOUND, but the file ("Test.bmp") is in the folder of the .exe. Can someone point out what's wrong with the line of code (or if the error isn't in this line)?