   D3DX: img.bmp: The system cannot find the file specified.
  I'm trying to make a program that displays a image on the screen. The function to load the image is this:hResult = D3DXLoadSurfaceFromFile(surface, NULL,  NULL,  "img.bmp",  NULL,D3DX_DEFAULT,  0,  NULL);if(FAILED(hResult))    {   MessageBox(NULL, "Failed to load image to surface", "Error!", MB_ICONEXCLAMATION | MB_OK);    }After running the program the image does not show up and the message box pops up. So I checked the debug output and it gave me this:D3DX: img.bmp: The system cannot find the file specified.Right now I have the image in the project directory yet the system cannot find it. hmm...should I put it somewhere else? Why isn't the system finding it?   
  I'd have expected to see TEXT("img.bmp") (or a similar macro) around the various string literals to handle UNICODE being defined (or not defined), but I suspect that the issue is more to do with working directories. Check the project properties and see what the Working Directory (Configuration Properties, Debugging) is set to - if nothing, it'll default to the directory that contains the project file.   ;  uh yeh, right now it's blank. and by the "directory that contains the project file." do you mean the folder with the .vcproj file?   ;  since you're running in debug, the exe is gonna be in the debug folder, the exe is gonna look in its directory for the image, try putting a copy of the image in the debug folder.EDIT: or just to make sure it's the path that's funky, use the absolute path, so for vista it's be "C:\\users\\user_name\\whatever\\img.bmp", or in XP "C:\\documents and settings\\user_name\\whatever\\img.bmp"   