|
|
|
Command IDs are constants which are passed to an application's
HandleCommandL() function when a menu item is selected. They are
associated with a particular UI element in the application's resource
file.
To define an application's command IDs:
Create a file, with extension .hrh, to contain the
command IDs
The command IDs must be kept in a separate file because they are
shared by both the C++ code and the resource definition. This file should be
#included in both the application's resource file and header
file.
Declare each command ID using the format below
#define EExampleMenuCommand1 0x1001
Note that by convention constants are declared using
#define rather than as enums — although the enum prefix E is
used. Note also that the value, for example 0x1001 must be unique for the application
and must not clash with the standard constants defined in Uikon. Typically, this
is avoided by beginning to number application command IDs from 0x1000.