Re: modifying resource.h and rc files
NoSpin wrote:
I downloaded some sample code off of the internet and I am attempting
to add certain features. I am a little confused about how .rc files
work, they have always been autogenerated for me. Here is the code I
have:
m_Control.CreateOffScreenSurface("ChessBoard",IDB_IMAGE);
IDB_IMAGE appears to look up the file name of a picture that the
program is to use. I would like to add a reference to another picture
so that I can display two pictures. The confusing part is IDB_IMAGE
appears to be defined in two places.
The function call is asking for a UINT (where IDB_IMAGE is passed).
IDB_IMAGE is defined as a some form of a constant string as well as a
const UINT. So somehow CreateOffScreenSurface is taking the UINT
version of IDB_IMAGE and looking up the string version. Here is the
two places it is defined:
this is in a .rc file
IDB_IMAGE BITMAP DISCARDABLE "res\\dino600x800.bmp"
[redacted]
What do I need to do to create another variable that points to a
different file? I tried defining a different variable in resource.h
and the rc file, but that didn't work, plus I didn't know what number
to put in the UNIT version.
Can someone help me understand what is going on in these two files?
Yes, someone can help you, but not in this group. You are asking about
either the Windows API, or Visual Studio specific stuff. Try a newsgroup
with either microsoft or windows in its name.