Page 175 - DCAP408_WEB_PROGRAMMING
P. 175
Unit 10: Menus
Cut, copy, and paste text Notes
Select all text
Before you start coding, take some time to review the program’s features to make a properly
designed and categorized menu system. As mentioned earlier in the section “Understanding the
Windows Standard Menus,” most menu bars begin with a File menu and are followed by an Edit
menu.
The following is a viable menu categorization for the feature set of the Amazing Text Editor.
File Menu Edit Menu
New Undo
Open Cut
Save Copy
Settings Paste
About Select All
Exit
Now that you have a categorized menu system, you can implement it in the Menu Editor. Table
10.1 shows the menu hierarchy and Name and Caption properties, as well as accelerator and
shortcut keys for each menu object.
10.4.1 Standard Functionality of Shortcut Keys
The shortcut keys used in Table 10.1 adhere to the established convention that Windows
programmers use for menu items with the demonstrated functionality.
Table 10.1: Menu Objects for the Amazing Text Editor Application
Name Caption Level Shortcut
mnuFile &File 0 None
itmNew &New 1 None
itmOpen &Open 1 None
itmSave &Save 1 None
sepOne - (a hyphen) 1 None
itmSettings Se&ttings 1 None
itmBlackOnWhite Black On White 2 None
itmWhiteOnBlack White On Black 2 None
itmAbout &About 1 None
sepTwo - 1 None
itmExit E&xit 1 Ctrl+X
mnuEdit &Edit 0 None
itmUndo &Undo 1 Ctrl+Z
sepThree - 1 None
itmCut Cu&t 1 Ctrl+X
itmCopy &Copy 1 Ctrl+C
itmPaste &Paste 1 Ctrl+V
sepFour - 1 None
itmSelectAll Select &All 1 Ctrl+A
LOVELY PROFESSIONAL UNIVERSITY 169