views:

130

answers:

1

Hey,

I have an rc file uses relative paths to locate the resource files (pictures etc.), for example

IDB_LINE BITMAP "..\Shared\Res\line.bmp"

BUT - a few projects are including the rc file, and these projects are found on different directory nesting levels inside the solution.

This results in the fact that some of them can't find the relative path, unless I perform some patchy soltion (duplicate the resources, create a hard link to the resources dir etc.).

I would have liked the rc file to look at its own directory for the resources files, but it doesn't do that unfortunately.

Alternatively, is there any way to reference the content of the $SolutionDir variable from within a header/resource script(rc) file?

Thanks!

A: 

You can define include paths for data included into resources, just as for header files included into source -- you should be able to find it in the right-click > Properties for the resource file, though as I recall it takes a little bit of finding the right tab (lack of detail as I don't have VC++ on this laptop).

Steve Gilham