diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-D52E98C3-F5EE-4CE1-A4F5-2EF41A066B8A.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-D52E98C3-F5EE-4CE1-A4F5-2EF41A066B8A.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,68 @@ + + + + Creating +resource header files +

Typically when you create an application, there are cases where you +need to create an enumerated set of command IDs (which are symbols with integer +values). These defined symbols can then be used in both your code and resource +files. Common examples of these cases, include:

+ +

These enumerated values need to be defined in a resource file, which +by convention has the extension hrh, The syntax is as +follows:

+enum TCommandIds + { + ECmdAppTest1 = 1, + ECmdView1Cmd1, + ECmdView1Cmd2, + ECmdView1Cmd3, + ECmdView2Cmd1, + ECmdView2Cmd2, + ECmdView2Cmd3, + ECmdView2Cmd4 + }; +

where

+ +

Each enumerator is followed by a ,, except for +the last value. It is recommended to have a final ; after +the enumerated list. If a specific value is not assigned to a symbol in the +enumerated list, then the value is that of the previous enumerator plus one. +Thus, the value for ECmdView1Cmd1 above is 2.

+

For more information about the use of the enum statement, +see ENUM statement.

+
\ No newline at end of file