The inclusion of shared resources in several projects at different levels of nesting (visual C ++)

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

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

BUT - several projects include an rc file, and these projects are at different levels of nesting of resources within the solution.

As a result, some of them cannot find the relative path if I do not implement any heterogeneous solution (duplicate resources, create a hard link to the dir resource, etc.).

I would like the rc file to see its own directory for resource files, but it does not, unfortunately.

Alternatively, is there a way to refer to the contents of a variable $SolutionDirfrom a script (rc) header / resource file?

+3
source share
1 answer

You can determine if the paths for the data included in the resources are included in the same way as for the header files included in the source code - you should find it in the right click> Properties for the resource file, although, as I recall, it accepts find the correct tab a bit (lack of details, since I don't have VC ++ on this laptop).

+2
source

Source: https://habr.com/ru/post/1722246/


All Articles