N
NoSpin
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"
and this is all of resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by DirectX.rc
//
#define IDD_ABOUTBOX 100
#define ID_START 102
#define IDR_MAINFRAME 128
#define IDR_DIRECTTYPE 129
#define IDB_IMAGE 130
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 103
#endif
#endif
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?
Thanks,
Brett
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"
and this is all of resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by DirectX.rc
//
#define IDD_ABOUTBOX 100
#define ID_START 102
#define IDR_MAINFRAME 128
#define IDR_DIRECTTYPE 129
#define IDB_IMAGE 130
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 103
#endif
#endif
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?
Thanks,
Brett