Originally Posted by
anonytmouse
The LR_DEFAULTSIZE flag is not used for bitmaps. Also, is the file a valid .bmp file? What error value are you getting from GetLastError after the failed call?
My call now looks like this:
Code:
TImage = (HBITMAP)LoadImage(NULL, Tmem.DisplayImage, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
And the call to get last error looks like this:
Code:
error = GetLastError();
cout<< error;
Which prints '2'
I have never used GetLastError() before so I don't know what this means, error is of type DWORD
Edit: After surfing MSDN I found that 2 means "File not found" but when I print Tmem.DisplayImage it successfully reads "F:\drive\projects\function tests\poop.bmp"