views:

21

answers:

1

I would like to include common resources into two of my applications. Rather than using a DLL, I figured I could include common resources at compile/link time by making use of a .RC2 file.

I've added a load of BITMAP entries as follows to my .RC2 file

IDB_CHECK BITMAP DISCARDABLE "\NewGUILib\res\bmpCheck.bmp"

My .EXE definitely increases in size when the .RC2 file contains these bitmaps. However, when I try to use the resource IDs in my application (CBitmap::LoadBitmap( id )), the functions fail. LoadBitmap( IDB_CHECK ) returns zero. However, if I use a resource added to the .RC1 file via Visual Studio, that works.

Is there something else I need to do to use these .RC2 resources??

A: 

OK, I found the answer to my problem. The problem is that I didn't have any resource ID's included in the .RC2 file. In the example above IDB_CHECK was not defined. An error or warning during resource compilation would have been useful.. but.. I guess I expect too much.. All sorted.

SparkyNZ