The Microsoft Foundation Class Library defines a number of standard command and window IDs in AFXRES.H. These IDs are most commonly used within the resource editors and ClassWizard to map messages to your handler functions. All standard commands have an ID_ prefix. For example, when you use the menu editor, you normally bind the File Open menu item to the standard ID_FILE_OPEN command ID.
For most standard commands, application code does not need to refer to the command ID, because the framework itself handles the commands through message maps in its primary framework classes (CWinThread, CWinApp, CView, CDocument, and so forth).
In addition to standard command IDs, a number of other standard IDs are defined which have a prefix of AFX_ID. These IDs include standard window IDs (prefix AFX_IDW_), string IDs (prefix AFX_IDS_), and several other types.
IDs that begin with the AFX_ID prefix are rarely used by programmers, but you might need to refer to these IDs when overriding framework functions which also refer to the AFX_IDs.
IDs are not individually documented in this reference. You can find more information on them in Technical Notes 20, 21, and 22.
Note The header file AFXRES.H is indirectly included in AFXWIN.H. You must explicitly include the statement
#include afxres.h
in your application's resource script (.RC) file.