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

📄 chxb.htm

📁 VC使用大全。里面集合了VC使用的各种使用技巧。非常有用。
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<P><A ID="I32" NAME="I32"><B>File Page Setup</B></A></P>

<P>This item brings up the Page Setup dialog box, shown in Figure B.23. Here you specify the header, footer, and margins&#151;left, right, top, and bottom. The header and footer can contain any text including one or more special fields, which you add by 
clicking the arrow next to the edit box or entering the codes yourself. The codes are:</P>

<ul>

<li> <I>Filename</I>. The name of the file being printed (<font color="#008000">&amp;f</font>).</P>

<li> <I>Page Number</I>. The current page number (<font color="#008000">&amp;p</font>).</P>

<li> <I>Current Time</I>. The time the page was printed (<font color="#008000">&amp;t</font>).</P>

<li> <I>Current Date</I>. The date the page was printed (<font color="#008000">&amp;d</font>).</P>

<li> <I>Left Align</I>. Align this portion to the left (<font color="#008000">&amp;l</font>).</P>

<li> <I>Right Align</I>. Align this portion to the right (<font color="#008000">&amp;c</font>).</P>

<li> <I>Center</I>. Center this portion (this is the default alignment) (<font color="#008000">&amp;c</font>).</P>

</ul>

<A HREF="FFfig23.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/figs/chxb/FFfig23.gif"><b>Fig. B.23</b></A>

<P><I>The Page Setup dialog box lays out your printed pages the way you want.</I></P>

<P><A ID="I33" NAME="I33"><B>File Print (Ctrl+P)</B></A></P>

<P>Choosing this item prints the file with focus according to your Page Setup settings. (The item is grayed if no file has focus.) The Print dialog box, shown in Figure B.24, has you confirm the printer you want to print on. If you have some text 
highlighted, the S<U>e</U>lection radio button is enabled. Choosing it lets you print just the selected text; otherwise, only the <U>A</U>ll radio button is enabled, which prints the entire file. If you forget to set the headers, footers, and margins 
before choosing <U>F</U>ile, <U>P</U>rint, the <U>S</U>etup button brings up the Page Setup dialog box discussed in the previous section. There is no way to print only certain pages or to cancel printing once it has started.</P>

<A HREF="FFfig24.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/figs/chxb/FFfig24.gif"><b>Fig. B.24</b></A>

<P><I>The Print dialog box confirms your choice to print a file.</I></P>

<P><A ID="I34" NAME="I34"><B>Recent Files and Workspaces</B></A></P>

<P>The recent files and workspaces items, between <U>P</U>rint and E<U>x</U>it, each lead to a cascading menu. The items on the secondary menus are the names of files and workspaces which have been opened most recently, up to the last four of each. These 
are real time-savers if you work on several projects at once. Whenever you want to open a file, before you click that toolbar button and prepare to point and click your way to the file, think first if it might be on the File menu. Menus aren't always the 
slower way to go.</P>

<P><A ID="I35" NAME="I35"><B>File Exit</B></A></P>

<P>Probably the most familiar Windows menu item of all, this closes Developer Studio. You can also click the X in the top-right corner, or double-click what used to be the system menu in the top left. If you have made changes without saving, you get a 
chance to save each file on your way out.</P>

<P><A ID="I36" NAME="I36"><B>Edit</B></A></P>

<P>The Edit menu, shown in Figure B.25, collects actions related to changing text in a source file.</P>

<A HREF="FFfig25.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/figs/chxb/FFfig25.gif"><b>Fig. B.25</b></A>

<P><I>The Edit menu holds items that change the text in a file.</I></P>

<P><A ID="I37" NAME="I37"><B>Edit Undo (Ctrl+Z)</B></A></P>

<P>The Undo item reverses whatever you just did. Most operations, like text edits and deleting text, can be undone. When Undo is disabled, it is an indication that nothing needs to be undone or you cannot undo the last operation.</P>

<P>There is an Undo button on the Standard toolbar. Clicking the button displays a stack (reverse order list from most recent to least recent) of operations that can be undone. You must select a contiguous range of undo items including the first, second, 
and so on. You cannot pick and choose.</P>

<P><A ID="I38" NAME="I38"><B>Edit Redo (Ctrl+Y)</B></A></P>

<P>As you undo actions, the name given to the operations move from the Undo to the Redo list (Redo is next to Undo on the toolbar). If you undo a little too much, choose <U>E</U>dit, <U>R</U>edo to un-undo them (if that makes sense).</P>

<P><A ID="I39" NAME="I39"><B>Edit Cut (Ctrl+X)</B></A></P>

<P>This item cuts the currently highlighted text to the Clipboard. That means a copy of it goes to the Clipboard, and the text itself is deleted from your file. The Cut button (represented as scissors) is on the Standard toolbar.</P>

<P><B> </B><A ID="I40" NAME="I40"><B>Edit Copy (Ctrl+C)</B></A></P>

<P>Editing buttons on the toolbar are grouped next to the scissors (Cut). <U>E</U>dit, <U>C</U>opy copies the currently selected text or item to the Windows Clipboard.</P>

<P><B> </B><A ID="I41" NAME="I41"><B>Edit Paste (Ctrl+V)</B></A></P>

<P>Choosing this item copies the Clipboard contents at the cursor, or replaces the highlighted text with the Clipboard contents if any text is highlighted. The Paste item and button are disabled if there is nothing in the Clipboard in a format appropriate 
for pasting to the focus window. In addition to text, you can copy and paste menu items, dialog box items, and other resources. The Paste button is on the Standard toolbar.</P>

<P><A ID="I42" NAME="I42"><B>Edit Delete (Delete)</B></A></P>

<P><U>E</U>dit, <U>D</U>elete clears the selected text or item. If what you deleted is undeletable, then the Undo button is enabled and the last operation is added to the Undo button combo box. Deleted material does not go to the Clipboard and cannot be 
retrieved except by undoing the delete.</P>

<P><A ID="I43" NAME="I43"><B>Edit Select All (Ctrl+A)</B></A></P>

<P>This item selects everything in the file with focus that can be selected. For example, if a text file has focus, the entire file is selected. If a dialog box has focus, every control on it is selected.</P>

<P>To select many items on a dialog box, you can click the first item and then Ctrl+click each of the remaining items. It is often faster to use <U>E</U>dit, Select A<U>l</U>l to select everything, and then Ctrl+click to unselect the few items you do not 
want highlighted.</P>

<P><A ID="I44" NAME="I44"><B>Edit Find (Ctrl+F)</B></A></P>

<P>The Find dialog box shown in Figure B.26 enables you to search for text within the file that currently has the focus. Enter a word or phrase into the Fi<U>n</U>d<font color="#008000"> </font>What edit box. The following check boxes set the options for 
the search:</P>

<ul>

<li> <I>Match </I><I><U>W</U></I><I>hole Word Only</I>. If this is checked, <font color="#008000">table</font> in the Find What box matches only <font color="#008000">table</font>, not <font color="#008000">suitable</font> or <font 
color="#008000">tables</font>.</P>

<li> <I>Match </I><I><U>C</U></I><I>ase</I>. If this is checked, <font color="#008000">Chapter</font> in the Find What box matches only <font color="#008000">Chapter</font>, not <font color="#008000">chapter</font> or <font color="#008000">CHAPTER</font>. 
Upper- and lowercase must match.</P>

<li> <I>Regular </I><I><U>E</U></I><I>xpression</I>. The Find What box is treated as a regular expression if this box is checked.</P>

<li> <I>Search </I><I><U>A</U></I><I>ll Open Documents</I>. Expands your search to all the documents you have open at the moment.</P>

<li> <I>Direction</I>. Choose the <U>U</U>p radio button to search backwards, and the <U>D</U>own radio button to search forwards through the file.</P>

</ul>

<A HREF="FFfig26.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/figs/chxb/FFfig26.gif"><b>Fig. B.26</b></A>

<P><I>The Find dialog box is used to find a string within the file that has focus.</I></P>

<blockquote><p><img src="tip.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/tip.gif">

<P>If you highlight a block of text before selecting Edit, Find, 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.</P>

<p><img src="bottom.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/bottom.gif"></blockquote>

<P>A typical use for the Find dialog box is to enter some text and click the <U>F</U>ind Next button until you find the precise occurrence of the text for which you are searching. But you may want to combine the Find feature with bookmarks (discussed a 
little later in this section), and put a bookmark on each line that has an occurrence of the string. Click the <U>M</U>ark All button in the Find dialog box to add temporary, unnamed bookmarks on match lines; they are indicated with a blue oval in the 
margin.</P>

<P>There is a Find edit box on the Standard toolbar. Enter the text you want to search for in the box and press Enter to search forward. Regular expressions are used if you have turned them on using the Find dialog box. To repeat a search, click the Find 
Next or Find Previousbuttons on the Standard toolbar (these are icons with binoculars with clockwise and counter-clockwise arrows, respectively).</P>

<blockquote><p><img src="sidebar.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/sidebar.gif">

<P ALIGN="CENTER">

<CENTER><I>Regular Expressions</I></CENTER></P>

<P>Many of the find and replace operations within Developer Studio can be made more powerful with regular expressions. For example, if you want to search for a string only at the end of a line, or one of several similar strings, you can do so by 
constructing an appropriate regular expression, entering it in the Search dialog box, and instructing Developer Studio to use regular expressions for the search. A regular expression is some text, combined with special characters that represent things that 
can't be typed, like &quot;the end of a line&quot; or &quot;any number&quot; or &quot;three capital letters.&quot;</P>

<P>When regular expressions are being used, some characters give up their usual meaning and instead stand in for one or more other characters. Regular expressions in Developer Studio are built from ordinary characters mixed in with these special entries, 
shown in Table B.1.</P>

<P>You don't have to type these in if you have trouble remembering them. Next to the Find What box is an arrowhead pointing to the right. Click there to bring up a shortcut menu of all these fields, and click any one of them to insert it into the Find 
What box. (You need to be able to read these symbols to understand what expression you are building, and there's no arrowhead on the toolbar&#146;s Find box.) Remember to select the Regular Expressions box so that these regular expressions are evaluated 
properly.</P>

<P>Here are some examples of regular expressions:</P>

<ul>

<li> <font color="#008000">^test$</font> matches only <font color="#008000">test</font> alone on a line.</P>

<li> <font color="#008000">doc[1234]</font> matches <font color="#008000">doc1</font>, <font color="#008000">doc2</font>, <font color="#008000">doc3</font>, or <font color="#008000">doc4</font> but not <font color="#008000">doc5</font>.</P>

<li> <font color="#008000">doc[1-4]</font> matches the same strings as above but requires less typing.</P>

<li> <font color="#008000">doc[^56]</font> matches <font color="#008000">doca</font>, <font color="#008000">doc1</font>, and anything else that starts with <font color="#008000">doc</font> and is not <font color="#008000">doc5</font> or <font 
color="#008000">doc6</font>.</P>

<li> If the Find What box contains <font color="#008000">(\Good\) morning</font> and the replace box is <font color="#008000">\1 afternoon</font>, then <font color="#008000">Good </font><font color="#008000">morning</font> is changed to <font 
color="#008000">Good afternoon</font>.</P>

<li> <font color="#008000">H\~ello</font> matches <font color="#008000">Hillo</font> and <font color="#008000">Hxllo</font> (and lots more) but not <font color="#008000">Hello</font>.</P>

<li><font color="#008000"> </font><font color="#008000">\{x\!y\}z</font> matches <font color="#008000">xz</font> and <font color="#008000">yz</font>.</P>

<li> <font color="#008000">New *York</font> matches <font color="#008000">New York</font> but also <font color="#008000">NewYork</font> and <font color="#008000">New      York</font>.</P>

<li> <font color="#008000">New +York</font> matches <font color="#008000">New York</font> and <font color="#008000">New      York</font> but not <font color="#008000">NewYork</font>.</P>

<li> <font color="#008000">New.*k</font> matches <font color="#008000">Newk</font>, <font color="#008000">Newark</font>, and <font color="#008000">New York</font>, plus lots more.</P>

<li> <font color="#008000">\:n</font> matches <font color="#008000">0.123</font>, <font color="#008000">234</font>, and <font color="#008000">23.45</font> (among others) but not <font color="#008000">-1C.</font></pre>

<li> <font color="#008000">World$</font> matches <font color="#008000">World</font> at the end of a line but <font color="#008000">World\$</font> matches only <font color="#008000">World$</font> anywhere on a line.</P>

</ul>

<p><img src="bottom.gif" tppabs="http://www.mcp.com/814147200/0-7897/0-7897-1145-1/bottom.gif"></blockquote>

<P><I>Table B.1&#151;Regular Expression Entries</I></P>

<TABLE BORDER>

<TR>

<TD>

<P><B>Entry</B></P>

<TD>

<P><B>Matches</B></P>

<TR>

<TD>

<P>[af]</P>

<TD>

<P>Start of the line.</P>

<TR>

<TD>

<P>$</P>

<TD>

<P>End of the line.</P>

<TR>

<TD>

<P>.</P>

⌨️ 快捷键说明

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