Resource Troubles.

Hey there,
I've been cross referencing several textbooks to find the correct way to include resource files into my Win32 API applications.

I've followed these steps.

1. Find a bitmap(32-bit).
2. Plug it into Resedit and create the .rc and resource.h
3. Include the .rc and resource.h in my solution.
4. compile.

The issue I'm having is the compiler is telling me that it can't find the original .bmp image that resedit has created a directory to.
I tried moving the .bmp into the project folder and remaking the .rc and resource.h but, it still says it can't find my .bmp.

Does anyone have any suggestions?
If you use full path to the .bmp image it works ?

If so, maybe "project folder" is not the same as compiler working directory.
closed account (13bSLyTq)
Hi,

I've done these sorts of things before, can you give me additional information such as how did you included the resource file.

Thanks!
Thank you for your help guys.

I did some fiddling around with different things here and there but, there didn't seem to be any errors in the steps I took.

So I simplified the pathway for Resedit by making the location of my .bmp:

"C:\\bitmapFile.bmp"

And it worked.
I have a feeling that the way ResEdit made the pathway, VS C++ didn't like the name of one of the folders.
In fact I think one of the folders is my username with an apostrophe ' where in C++ \' is an exit character.

ResEdit seems to have a bug when creating a pathway to a folder that has an apostrophe; it places a \' where it should be ' for a string populated with a file pathway.
Last edited on
Visual Studio thinks that working directory is <project name> subfolder, NOT the same folder as .sln file, so if you created a subfolder named "res" in the same folder as .sln file, use something like:
../res/bitmap.bmp
and it should work.
Topic archived. No new replies allowed.