book_text10.htm

来自「深入编程内幕vc++ 非常适合处学者学习」· HTM 代码 · 共 762 行 · 第 1/5 页

HTM
762
字号
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">pDC_&gt;GetTextMetrics(&amp;tm);<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">&nbsp;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">nheight=tm.tmHeight+tm.tmExternalLeading;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; 
            </SPAN><O:P></O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>for 
            (i=0;i&lt;4;i++)<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; 
            </SPAN>nColumnWidth[i]=(pDC_&gt;GetTextExtent(ColumnName[i])).cx;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>RECT r;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="MARGIN-LEFT: 1cm; TEXT-INDENT: 0cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; 
            </SPAN>r.right=r.left=720;<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>r.top=_720;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="TEXT-INDENT: 1cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; 
            </SPAN>r.bottom=(r.top_nheight);<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">&nbsp;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>//print the 
            column headers<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>for 
            (i=0;i&lt;4;i++)<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">{<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN><SPAN 
            style="mso-tab-count: 1">&nbsp; 
            </SPAN>r.right=r.left+nColumnWidth[i];<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="MARGIN-LEFT: 1cm; TEXT-INDENT: 1cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">pDC_&gt;ExtTextOut(r.left,r.top,ETO_CLIPPED,<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="MARGIN-LEFT: 5cm; TEXT-INDENT: 0cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; 
            </SPAN>&amp;r,ColumnName[i],NULL);<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; 
            </SPAN>r.left=r.right;<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">}<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; 
            </SPAN>r.top_=nheight;<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; 
            </SPAN>r.bottom_=nheight;<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">&nbsp;<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>//print next 20 
            student records<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN>for 
            (j=0;j&lt;5;j++)<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;</SPAN>{<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; 
            </SPAN>r.right=r.left=720;<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN>for 
            (i=0;i&lt;4;i++)<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="TEXT-INDENT: 1cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-spacerun: yes">&nbsp; </SPAN>{<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent style="mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 
            style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp; </SPAN><SPAN 
            style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; 
            </SPAN>r.right=r.left+nColumnWidth[i];<O:P> </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="MARGIN-LEFT: 2cm; TEXT-INDENT: 0cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black">pDC_&gt;ExtTextOut(r.left,r.top,ETO_CLIPPED,&amp;r,<O:P> 
            </O:P></SPAN></P>
            <P class=MsoNormalIndent 
            style="MARGIN-LEFT: 2cm; TEXT-INDENT: 0cm; mso-line-height-alt: 1.3pt"><SPAN 
            lang=EN-US 
            style="BACKGROUND: #d9d9d9; FONT-FAMILY: 'Courier New'; mso-bidi-font-family: 'Times New Roman'; mso-shading: white; mso-pattern: gray-15 black"><SPAN 

⌨️ 快捷键说明

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