I am having a very strange issue in regards to loading an image into my program.
When I'm in debug mode, the image status keeps telling me "Invalid Parameter", however, when I run the same program normally, it loads the image no problem.
I've ruled out directory names and such, and now I am just confused.
Here's the code I've been using (It's a bit messy as I've been trying various things to get it to work):
Code:
void OnPaint(HDC hdc)
{
Bitmap myImage(L"a.png");
Graphics mygfx(hdc);
Status st = myImage.GetLastStatus();
if(Ok == st)
{
mygfx.DrawImage(&myImage,60,10);
}
else if(InvalidParameter == st)
{
MessageBox(NULL,L"InvalidParameter",L"What",MB_OK);
}
}