⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apc.htm

📁 Using Visual C++ 6.0 一本关于Visual C++ 6.0基本编程应用的书籍。
💻 HTM
📖 第 1 页 / 共 5 页
字号:
		<TD ALIGN="LEFT">A single letter.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:d</TD>
		<TD ALIGN="LEFT">A single numerical digit.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:n</TD>
		<TD ALIGN="LEFT">An unsigned number.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:z</TD>
		<TD ALIGN="LEFT">An unsigned integer.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:h</TD>
		<TD ALIGN="LEFT">A hexadecimal number.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:i</TD>
		<TD ALIGN="LEFT">A string of characters that meets the rules for C++ identifiers (starts with a letter,
			number, or underscore).</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:w</TD>
		<TD ALIGN="LEFT">A string of letters only.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\:q</TD>
		<TD ALIGN="LEFT">A quoted string surrounded by double or single quotes.</TD>
	</TR>
	<TR ALIGN="LEFT" VALIGN="TOP">
		<TD ALIGN="LEFT">\</TD>
		<TD ALIGN="LEFT">Removes the special meaning from the character that follows.</TD>
	</TR>
</TABLE>
</P>
<P><B>Edit Find in Files&#160;&#160;</B>This useful command searches for a word or
phrase within a large number of files at once. In its simplest form, shown in Figure
C.25, you enter a word or phrase into the Find What edit box, restrict the search
to certain types of files in the In Files /File Types box, and choose the folder
to conduct the search within the In Folder edit box. The following check boxes in
the bottom half of the dialog box set the options for the search:</P>
<P><A HREF="javascript:popUp('xcuvc25.gif')"><B>FIG. C.25</B></A><B> </B><I>The simplest
Find In Files approach searches for a string within a folder and its subfolders.</I></P>

<UL>
	<LI><I>Match Whole Word Only</I>. If this is checked, table in the Find What box
	matches only table, not suitable or tables.
	<P>
	<LI><I>Match Case</I>. If this is checked, Chapter in the Find What box matches only
	Chapter, not chapter or CHAPTER. Uppercase and lowercase must match.
	<P>
	<LI><I>Regular Expression</I>. The Find What box is treated as a regular expression
	(see the sidebar &quot;Regular Expressions&quot;) if this box is checked.
	<P>
	<LI><I>Look in Subfolders</I>. Work through all the subfolders of the chosen folder
	if this is checked.
	<P>
	<LI><I>Output to Pane 2</I>. Sends the results to the Find in Files 2 pane of the
	output window, so as not to wipe out the results of an earlier search.
</UL>

<P><B>Using Advanced Text Finding Features&#160;&#160;</B>At the bottom right of
the Find in Files dialog box is the Advanced button. Clicking it expands the dialog
box shown in Figure C.26 and allows you to search several different folders at once.</P>
<P><A HREF="javascript:popUp('xcuvc26.gif')"><B>FIG. C.26</B></A><B> </B><I>Advanced
Find in Files searches for a string within several folders and their subfolders.</I></P>


<BLOCKQUOTE>
	<P>
<HR>
<strong>TIP:</strong> If you highlight a block of text before selecting Find in Files, that
	text is put into the Find What box for you. If no text is highlighted, the word or
	identifier under the cursor is put into the Find What box. 
<HR>


</BLOCKQUOTE>

<P>The results of the Find in Files command appear in the Find in Files 1 tab (unless
you ask for pane 2) of the output window; the output window will be visible after
this operation if it was not already. You can resize this window like any other window,
by holding the mouse over the border until it becomes a sizing cursor, and you can
scroll around within the window in the usual way. Double-clicking a filename in the
output list opens that file with the cursor on the line where the match was found.</P>
<P><B>Edit Replace (Ctrl+H)&#160;&#160;</B>This item opens the Replace dialog box,
shown in Figure C.27. It is very similar to the Find dialog box but is used to replace
the found text with new text. Enter one string into the Find What edit box and the
replacement string into the Replace With edit box. The three check boxes--Regular
Expression, Match Case, and Match Whole Word Only--have the same meaning as on the
Find dialog box (discussed in the previous section). The Replace In radio buttons
enable you to restrict the search-and-replace operation to a block of highlighted
text, if you prefer.</P>
<P><A HREF="javascript:popUp('xcuvc27.gif')"><B>FIG. C.27</B></A><B> </B><I>The Replace
dialog box is used to replace one string with another.</I></P>

<P>To see the next match before you agree to replace it, click Find Next. To replace
the next match or the match you have just found, click Replace. If you are confident
that there won't be any false matches, you can click Replace All to do the rest of
the file all at once. (If you realize after you click Replace All that you were wrong,
there is always Edit, Undo.)</P>
<P><B>Edit Go To (Ctrl+G)&#160;&#160;</B>The Go To dialog box (see Figure C.28) is
a central navigation point. It enables you to go to a particular line number (the
default), address, reference, or bookmark, among other things. To use the Go To dialog
box, select something from the Go To What list on the left; if Line is selected,
enter a line number; if Bookmark is selected, pick the particular bookmark from the
combo box; and so on.</P>
<P><A HREF="javascript:popUp('xcuvc28.gif')"><B>FIG. C.28</B></A><B> </B><I>The Go
To dialog box moves you around within your project.</I></P>

<P>The Go To What box contains the following choices:</P>

<UL>
	<LI><I>Address</I>. In the Memory or Disassembly windows, as explained in Appendix
	D, you can go to an address given by a debugger expression.
	<P>
	<LI><I>Bookmark</I>. In a text file, you can go to a bookmark, though you are more
	likely to choose Edit, Bookmarks or the bookmark-related buttons on the Edit toolbar.
	<P>
	<LI><I>Definition</I>. If the cursor is over the name of a function, this opens the
	source (.cpp) file at its definition. If the cursor is over a variable, it opens
	the include (.h) file.
	<P>
	<LI><I>Error/Tag</I>. After a compile, you can move from error to error by double-clicking
	them within the output window by using this dialog box or (most likely) by pressing
	F4.
	<P>
	<LI><I>Line</I>. This is the default selection. The line number that is filled in
	for you is your current line.
	<P>
	<LI><I>Offset</I>. Enter an offset address (in hexadecimal).
	<P>
	<LI><I>Reference</I>. Enter a name, such as a function or object name, and the cursor
	will be placed on the line of code where the name is defined, in your code or in
	the MFC libraries.
</UL>



<BLOCKQUOTE>
	<P>
<HR>
<strong>TIP:</strong> The pushpin in the upper-left corner of this dialog box is used to
	&quot;pin&quot; it to the screen so that it stays in place after you have gone to
	the requested location. Click the pin to unpin the dialog box from the screen so
	that it goes away after the jump. 
<HR>


</BLOCKQUOTE>

<P><B>Edit Bookmarks (Alt+F2)&#160;&#160;</B>This item is used to manage the bookmarks
within your text files. The bookmark list is shown in Figure C.29. Note that temporary
bookmarks set by the Find command are not included in this list.</P>
<P><A HREF="javascript:popUp('xcuvc29.gif')"><B>FIG. C.29</B></A><B> </B><I>The Bookmark
dialog box manages the bookmarks you have set in text files.</I></P>

<P>To add a named bookmark for the line you are on and have it saved with the file,
type a name in the Name box and click Add. To go to a named bookmark, choose it from
the list box and click Go To. There are buttons on the Edit toolbar to add or delete
a bookmark at the cursor, move to the next or preceding bookmark, and clear all bookmarks
in the file.</P>
<P><B>Edit ActiveX Control in HTML&#160;&#160;</B>If you have Visual InterDev installed
and are working with an ActiveX control, this menu item will let you edit its settings.
Building ActiveX controls is discussed in Chapter 17, &quot;Building an ActiveX Control.&quot;</P>
<P><B>Edit HTML Layout&#160;&#160;</B>This item is used to edit an HTML layout with
Visual InterDev.</P>
<P><B>Edit Advanced&#160;&#160;</B>Choosing this item opens a cascading menu with
the following items:</P>

<UL>
	<LI><I>Incremental Search</I>. This is a faster search than opening the Find dialog
	box discussed earlier. You enter your search string directly on the status bar. As
	you type each letter, Developer Studio finds the string you have built so far. For
	example, in a header file, if you choose Edit, Advanced, Incremental Search and then
	type <B>p</B>, the cursor will jump to the first instance of the letter p, probably
	in the keyword public. If you then type <B>r</B>, the cursor will jump to the first
	pr, probably in the keyword protected. This can save you typing the entire word you
	are looking for.
	<P>
	<LI><I>Format Selection</I>. This item adjust the indenting of a selection using
	the same rules that apply when you are entering code.
	<P>
	<LI><I>Tabify Selection</I>. Converts spaces to tabs.
	<P>
	<LI><I>Untabify Selection</I>. Converts tabs to spaces.
	<P>
	<LI><I>Make Selection Uppercase</I>. Converts the selected text to capital letters.
	<P>
	<LI><I>Make Selection Lowercase</I>. Converts the selected text to lowercase letters.
	<P>
	<LI><I>View Whitespace</I>. Inserts small placeholder characters (. for space and
	&gt;&gt; for tab) to show all the whitespace in your document.
</UL>

<P><B>Edit Breakpoints (Alt+F9)&#160;&#160;</B>A <I>breakpoint</I> pauses program
execution. The Edit, Breakpoints item displays the Breakpoints dialog box, shown
in Figure C.30 and discussed in Appendix D.</P>
<P><A HREF="javascript:popUp('xcuvc30.gif')"><B>FIG. C.30</B></A><B> </B><I>The Breakpoints
dialog box is used in debugging your application.</I></P>

<P><B>Edit List Members (Ctrl+Alt+T)&#160;&#160;</B>This item is used to &quot;reawaken&quot;
Autocomplete for code you have already typed. It opens a list of member variables
and functions for the class whose implementation you are editing, as well as global
variables and functions. This list is generally too long to be useful.</P>
<P><B>Edit Type Info (Ctrl+T)&#160;&#160;</B>This pops up a little window telling
you the type of variable the cursor is on. You can get this window much more easily
by pausing the mouse over the variable and waiting a second or two.</P>
<P><B>Edit Parameter Info (Ctrl+Shift+Space)&#160;&#160;</B>This pops up a window
reminding you of the parameters taken by the function the cursor is on. Again, this
information will pop up if you just pause the mouse over the function name.</P>
<P><B>Edit Complete Word (Ctrl+Space)&#160;&#160;</B>This asks Autocomplete to fill
in the word you are typing. If you haven't typed much of it, you may get a dialog
box from which to choose the word you want. The Autocomplete dialog box generally
only appears after you have typed -&gt; or . to indicate you are looking for a member
function or variable. When the function you want to call is a member of the class
you are editing, it's annoying to type this--&gt; just to open Autocomplete. Use
Ctrl+Space instead.</P>


<BLOCKQUOTE>
	<P>
<HR>
<strong>NOTE:</strong> If these options are disabled, check your AutoComplete settings by
	choosing Tools, Options and clicking the Editor tab, shown in Figure C.55.&#160;n
	
<HR>


</BLOCKQUOTE>

<H3><A NAME="Heading22"></A>Using the View Menu</H3>
<P>The View menu, shown in Figure C.31, collects actions that are related to the
appearance of Developer Studio--which windows are open, what toolbars are visible,
and so on.</P>
<P><B>View ScriptWizard&#160;&#160;</B>This InterDev-related command is used to edit
Web page scripts.</P>
<P><B>View ClassWizard (Ctrl+W)&#160;&#160;</B>ClassWizard is probably the most used
tool in Developer Studio.</P>
<P><A HREF="javascript:popUp('xcuvc31.gif')"><B>FIG. C.31</B></A><B> </B><I>The View
menu controls the appearance of Developer Studio.</I></P>

<P>Whenever you add a resource (menu, dialog box, control, and so on), you connect
it to your code with ClassWizard. When you are working with ActiveX, you use ClassWizard
to set up properties, methods, and events. If you use custom messages, you use ClassWizard
to arrange for them to be caught. You learn how to use ClassWizard starting in Chapter
2.</P>


<BLOCKQUOTE>
	<P>
<HR>
<B><strong>CAUTION:</strong> </B>All changed files are saved when you open ClassWizard,
	just as they are saved before a compile. If you have been making changes that you
	may not want saved, don't open ClassWizard. 
<HR>


</BLOCKQUOTE>

<P><B>View Resource Symbols&#160;&#160;</B>This item opens the Resource Symbols dialog
box, shown in Figure C.32. It displays the resource IDs, such as ID_EDIT_COPY, used
in your application. The large list box at the top of the dialog box lists resource
IDs, and the 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -