A SERVICE OF

logo

name of the event-handling function. For example, the response table
entry for the File Open menu choice looks like this:
EV_COMMAND(CM_FILEOPEN, CmFileOpen),
The EV_COMMAND macro requires the signature of the event-handling
function to take no parameters and return void. So the signature of the
event-handling function for the File Open menu choice looks like this:
void CmFileOpen();
Y u need to add identifiers for each of these menu choices. Here’ theo s
Adding event
definition of the event identifiers:
identifiers
#define CM_FILENEW 201
#define CM_FILEOPEN 202
#define CM_FILESAVE 203
#define CM_FILESAVEAS 204
#define CM_ABOUT 205
These identifiers are contained in the file STEP06.RC. The ObjectWindows
style places the definitions of identifiers in the resource script file, instead
of a header file. This cuts down on the number of source files required for a
project, and also makes it easier to maintain the consistency of identifier
values between the resources and the application source code.
The actual resource definitions in the resource file are contained in a block
contained in an #
ifndef/#endif block, like so:
#ifdef RC_INVOKED
// Resource definitions here.
.
.
.
#endif
RC_INVOKED is defined by all resource compilers, but not by C++
compilers. The resource information is never seen during C++ compilation.
Identifier definitions should be placed outside this #
ifndef/#endif block,
usually at the beginning of the file.
For now you want to add five menu choices to the application:,
Adding menu
File New
resources
File Open
File Save
File Save As
About
Chapter 2, Learning ObjectWindows
51