26. Getting Started with ActiveX Controls

Chapter 2 - A Quick Start Using the IDE

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

The Edit Menu
Edit menu items allow you to quickly edit or search through an active window’s contents in much the same way you would with any standard word processor. Figure 2-3 shows the Visual C++ IDE Edit menu with the Advanced pop-up menu.
Figure 2-3: The Visual C++ Edit menu
Undo
The Undo menu item allows you reverse the most recent editing change you made. You can also use the Undo option from the toolbar. The Undo option is the left-pointing arrow on the toolbar. This is the seventh icon from the left on our system.
Redo
The Redo menu item allows you to reverse the action of the last Undo. Use this option to reinstate a valid editing change that you thought was an incorrect change. The Redo option can also be used from the toolbar. On the toolbar, the Redo option is the right-pointing arrow. This is the eighth icon from the left on our system.
Cut
The Cut menu item copies the selected text in the active window to the Clipboard and then deletes the text from the active window. Selecting text is as simple as placing the mouse pointer on the first character in the text you want to cut and holding the left mouse button down while you drag the mouse to the right and/or down through the text. This causes the selected text to be displayed in reverse video.
The Cut command is often used in conjunction with the Paste command to move text from one location to another. When the cut text is placed on the Clipboard, all previous Clipboard contents are destroyed.
The Cut option can also be used from the toolbar. On the toolbar, the Cut option is the scissors icon. This is the fourth icon from the left on our system.
Copy
Like Cut, the Copy menu item places the selected text on the Clipboard. However, unlike Cut, Copy leaves the original selected text in place. A good use for this option would be to reproduce intricate code sequences or clarifying comments needed in multiple source files.
The Copy command is often used in conjunction with the Paste command to copy text from one location to another. When the copied text is placed on the Clipboard, all previous Clipboard contents are destroyed.
The Copy option can also be used from the toolbar. On the toolbar, the Copy option is the dual-page icon. This is the fifth icon from the left on our system.
Paste
The Paste menu item is used to insert the contents of the Clipboard at the current cursor location. The Clipboard can only paste information that has been previously placed on the Clipboard by the Cut or Copy command.
The Paste option can also be used from the toolbar. On the toolbar, the Paste option is the clipboard-page icon. This is the sixth icon from the left on our system.
Delete
The Delete menu item deletes selected text without copying the information to the Clipboard. Selecting text is as simple as placing the mouse pointer on the first character in the text you want to delete and holding the left mouse button down while you drag the mouse to the right and/or down through the text. This causes the selected text to be displayed in reverse video.
Even though deleted text is not copied to the Clipboard, you can still undo a Delete by choosing the Edit | Undo command.
Select All
The Select All menu item is used to select the entire contents of the active window for cutting, copying, or deleting.
Find...
The Find... menu item works very much like a standard word processor’s search option. However, since the C/C++ language is case sensitive, the Find... command can be tailored to search for case-sensitive, case-insensitive, and whole-word-only matches. The Find dialog box also allows you to set the direction for the search (up or down) from the current cursor location.
One very useful and sophisticated Find... option that is not usually associated with any word processor’s search capabilities is the Regular Expression option. Table 2-2 lists and describes the Regular Expression search pattern symbols that can be used in the Find What: window.
Table 2-2: Regular Expression Search String Patterns
Pattern
Meaning
*
Substitutes for any number of characters
Example: Data*1
Finds: Data1, DataIn1, DataOut1
.
Substitutes for a single character
Example: Data
Finds: Data1, Data2, but not DataIn1
^
Starts a search at the beginning of a line for the string
Example: ^do
Finds: each line beginning with “do”
+
Substitutes for any number of characters preceding the string
Example: +value
Finds: i_value, fvalue, lng_value
$
Starts a search at the end of each line for the string
Example: some_var_n);$
Finds: each line ending with “some_var_n);”
[ ]
Starts a search of the given character subset
Example: Data[A…Z]
Finds: DataA not Data1
Example: Data[1248]
Finds: Data2 not Data3
\
Starts a search for strings where the preceding character must be exactly matched
Example: Data[A…Zi\0…9]
Finds: DataAi1 not DataDo3
\{\}
Starts a search for any sequence of characters placed between the braces
Example: \{no\}*_answer
Finds: answer, no_answer, nono_answer, nonono_answer
Find in Files...
Find in Files... is one of the most valuable tools you’ll ever use once you understand its capabilities. Find in Files..., while identical in horsepower to Find..., adds one special advantage, the search has multiple-file scope! You may ask yourself, “Why would I ever need such a feature?” Here is why: If you are learning a new C/C++ language feature, use this option to scan for all programs containing it. If you are modifying a program, use Find in Files... to make certain you have caught all occurrences of the older syntax. If you are working on a large project, use Find in Files... to locate all of the code authored by a particular group or programmer. And remember, Find in Files... isn’t just capable of searching one subdirectory, or one hard drive. Find in Files... can scan an entire network, intranet, or the Internet, tracking down any name, string, keyword, method, and much more.
Replace...
The Replace... menu item invokes the Replace dialog box, which allows you to replace text. Simply type in the string to search for, then type in the replacement string, and, finally, select from several matching criteria. Matching options include whole words only, case-sensitive or case-insensitive matches, and Regular Expressions (see the previous explanation).
Be careful when selecting the Replace All option, because this can have disastrous results. There are two things to remember when doing a replace: first, save the file before you invoke the command; second, if something goes wrong with the replace, remember that you can always use the Undo option.
Go To...
You can quickly move the cursor to a specified location within an active edit window with the Go To... menu item. Choosing this option invokes a Line dialog box that allows you to enter the line number for the line of code you wish to jump to. Entering a line number greater than the actual number of source code lines available causes the command to place the cursor at the bottom of the window’s text file.
Bookmarks...
The Bookmarks... option allows you to set bookmarks to mark frequently accessed lines in your source file. Once a bookmark is set, you can use menu or keyboard commands to move to it. You can remove a bookmark when you no longer need it. You can use both named and unnamed bookmarks. Named bookmarks are saved between editing sessions. Once you create a named bookmark, you can jump to that location whether or not the file is open. Named bookmarks store both the line number and the column number of the location of the cursor when the bookmark was created. This location is adjusted whenever you edit the file. Even if you delete the characters around the bookmark, the bookmark remains in the correct location.
ActiveX Control in HTML... and HTML Layout...
These two options allow you to edit either an embedded HTML ActiveX control or the HTML layout itself.
Breakpoints...
The Breakpoints... option allows you to set breakpoints at specific locations, on selected data items, or on messages.
List Members
This feature displays a list of valid member variables or functions for the selected class or structure.
Type Info
The Type Info option displays a ToolTip containing the complete declaration for any identifier.
Parameter Info
This feature displays the complete declaration, including a parameter list, for the function to the left of the cursor. The parameter in bold indicates the next parameter required as you type the function.
Complete Word
The Complete Word option fills in the rest of your function or variable name for you. This can save you from having to repeatedly type long names.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net