The EditMenu sample application illustrates the following:
The two most common menus, the Edit menu and the File menu
How to use accelerator keys in an application
NOTE:
The accelerator keys shown in this sample are reserved and should be used only as accelerator keys for the Edit menu.
To create the EditMenu application, copy and rename the Generic source files. Then do the following:
1.Add the Edit and File menus to the resource script file.
2.Add definitions to the include file.
3.Add an accelerator table to the resource file.
4.Add a new variable.
5.Load the accelerator table.
6.Modify the message loop in WinMain.
7.Modify the WM_COMMAND case.
8.Build and run the application.
EditMenu does not show how to use the clipboard. For a description of how to use the clipboard, see Chapter 25.
NOTE:
Rather than typing the code provided in the following sections, you might find it more convenient to simply examine and build the sample source files provided on the sample disks.