亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? apc.htm

?? 好的教程Vc++21 天
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
need 120 pages. However, if you are printing a complex government tender with differentbill elements and formatted items, you'll probably need to measure the height ofall the different parts and calculate a page count after performing your own pagination.Either way, when you have the page count, OnPreparePrinting() is where you'll setit into the CPrintInfo object.</P><BLOCKQUOTE>	<P><HR><B>BYPASSING THE PRINT DIALOG BOX WHEN PRINTING</B></P>	<P>You don't always need to bother the user with the Print dialog box; this can be	bypassed by setting the pInfo-&gt;m_bDirect variable to TRUE in OnPreparePrinting().<HR></BLOCKQUOTE><P>To emphasize the difference between a full report and a window print, you canimplement a completely different drawing in the OnPrint() function than OnDraw(),as shown in Listing C.4. In this OnPrint(), the base class CView::OnPrint() functionisn't called at all, which means that the default call of OnDraw() isn't performed.So in this implementation, the printing output and the display output are entirelydifferent.</P><P><H4>LISTING C.4.&nbsp;LST23_4.CPP--IMPLEMENTING PAGE-SPECIFIC DRAWING IN OnPrint().</H4><PRE>1: void CPrintItView::OnPrint(CDC* pDC, CPrintInfo* pInfo)2: {3:    // TODO: Add your specialized code here 4:5:   // ** Create and select the font6:   CFont fnTimes;7:   fnTimes.CreatePointFont(720,&quot;Times New Roman&quot;,pDC);8:    CFont* pOldFont=(CFont*)pDC-&gt;SelectObject(&amp;fnTimes);9:10:    // ** Create and select the brush11:    CBrush brHatch(HS_CROSS,RGB(64,64,64));12:    CBrush* pOldBrush = 13:        (CBrush*)pDC-&gt;SelectObject(&amp;brHatch);14:15:    // ** Create the page text16:    CString strDocText;17:    strDocText.Format(&quot;Page Number %d&quot;,18:                         pInfo-&gt;m_nCurPage);19:20:    pDC-&gt;SetTextAlign(TA_CENTER+TA_BASELINE);21:22:    // ** Set up some useful point objects23:    CPoint ptCenter=pInfo-&gt;m_rectDraw.CenterPoint();24:    CPoint ptTopLeft=pInfo-&gt;m_rectDraw.TopLeft();25:  CPoint ptBotRight=pInfo-&gt;m_rectDraw.BottomRight();26:27:    // ** Create the points for the diamond28:    CPoint ptPolyArray[4]=29:    {30:        CPoint(ptTopLeft.x,ptCenter.y),31:        CPoint(ptCenter.x,ptTopLeft.y),32:        CPoint(ptBotRight.x,ptCenter.y),33:        CPoint(ptCenter.x,ptBotRight.y)34:    };35:36:    // ** Draw the diamond37:    pDC-&gt;Polygon(ptPolyArray,4);38:39:    // ** Draw the text40:    pDC-&gt;TextOut(ptCenter.x,ptCenter.y,strDocText);41:42:    // ** Unselect the fonts43:    pDC-&gt;SelectObject(pOldFont);44:    pDC-&gt;SelectObject(pOldBrush);45:}</PRE><P>In lines 6-12 of Listing C.4, the resources for the print (a font and a brush)are set up. Note that there is a better place to do this, as explained later in thischapter in the section &quot;Adding GDI Objects with OnBeginPrinting().&quot;</P><P>You can use the current page number to draw the different textual content of eachpage by its position in the printed document, as shown in line 17. In a real applicationyou would probably use this page number to reference the document and look up a specificitem of data. In the compact disc scenario mentioned earlier, this page number mightbe used to reference a specific CD, and the drawing functions would then use thatdata. I don't have space to demonstrate anything quite so sophisticated here, soI've just used the current page number from pInfo-&gt;m_nCurPage to illustrate thepoint.</P><P>Lines 22-37 set up a diamond-shaped polygon to draw as the background and line40 draws the text containing the current page in the middle of the page. Lines 43-44reselect the old font and brush.</P><P>If you build and run the program after making these changes to OnPrint() and thenclick the test application File menu and choose Print Preview, you should be ableto preview multiple pages using the Next Page<B> </B>and Prev Page<B> </B>buttonsshown in Figure C.3. If you have a printer attached, you'll also be able to printthe multipage document.</P><P><H3><A NAME="Heading9"></A>Using the Print Dialog Box</H3><P>Notice that when you print a multipage document, you are first presented witha dialog box that enables you to customize the print settings, as shown in FigureC.4. This is the standard Print dialog box and is called from the CView::DoPreparePrinting()function that was called from within the OnPreparePrinting() override. This dialogbox lets you set the page ranges to print, the number of copies, collation flags,the destination printer, and a whole host of things specific to the printer properties.</P><P><A HREF="javascript:popUp('23fig03.gif')"><B>FIGURE C.3.</B></A><B> </B><I>ThePrint Preview output of a multipage document.</I></P><P><A HREF="javascript:popUp('23fig04.gif')"><B>FIGURE C.4.</B></A><B> </B><I>Thestandard Print dialog box.</I></P><BLOCKQUOTE>	<P><HR><B>THE Collate CHECK BOX</B></P>	<P>If the user unchecks the Collate check box on the Print dialog box, the printer	driver will automatically repeat the same pages together. You don't need to do anything	special in your code to handle this--but the feature must be supported by the printer	driver; otherwise it will be disabled and inaccessible in the Print dialog box.<HR></BLOCKQUOTE><P>The user can change the print options from this dialog box, which will then updatethe settings in the CPrintInfo object before it is passed to your application. Youcan customize this dialog box to a small or great degree depending on the amountof customization you require and the work you're prepared to put into the job.</P><P>From the CPrintInfo class members in Table C.1, recall that there is an m_pPDpointer. This points to a CPrintDialog class that is an MFC wrapper class for thePrint dialog box. This class also holds an m_pd member, which is a PRINTDLG structureholding the default settings that are displayed in the Print dialog box. There aremany members of this structure, as shown in Listing C.5. This allows complete customizationof the dialog box defaults, even to the level of specifying a completely differentdialog box template than the default template (if you want a challenge). There isn'tenough space here to describe all these members in detail; one of the more obviousmembers is the nCopies member variable. You could change the default number of copiesdisplayed in this dialog box by setting the nCopies member of this structure directlybefore calling the CView::DoPreparePrinting() function. To do this, add the followingline to your OnPreparePrinting() function:</P><P><PRE>pInfo-&gt;m_pPD-&gt;m_pd.nCopies = 15;</PRE><P>When you open the Print dialog box after adding this line, the number of copieswill default to 15 (if your printer or printer driver supports multiple copies).You can set the other default values in the PRINTDLG accordingly.</P><BLOCKQUOTE>	<P><HR><B> USING THE </B>DevMode<B> STRUCTURE</B><BR>	</P>	<P>The DevMode structure holds many useful attributes that describe the technical	capabilities and configuration of the device. The structure pointer is returned by	the GetDevMode() function in the CPrintDialog class.<HR></BLOCKQUOTE><H4>LISTING C.5.&nbsp;LST23_5.CPP--THE PRINTDLG STRUCTURE.</H4><PRE>1:  typedef struct tagPD {2:  DWORD     lStructSize;3:  HWND      hwndOwner;4:  HANDLE    hDevMode;5:  HANDLE    hDevNames;6:  HDC       hDC;7:  DWORD     Flags;8:  WORD      nFromPage;9:  WORD      nToPage;10:  WORD      nMinPage;11:  WORD      nMaxPage;12:  WORD      nCopies;13:  HINSTANCE hInstance;14:  DWORD     lCustData;15:  LPPRINTHOOKPROC lpfnPrintHook;16:  LPSETUPHOOKPROC lpfnSetupHook;17:  LPCTSTR    lpPrintTemplateName;18:  LPCTSTR    lpSetupTemplateName;19:  HANDLE    hPrintTemplate;20:  HANDLE    hSetupTemplate;21:  } PRINTDLG;</PRE><P>After the user has confirmed OK in the Print dialog box, you can retrieve thechanges by using the CPrintDialog class access functions shown in Table C.2. So ifyou wanted to find the number of copies specified by the user before printing, youcould catch the value after it is returned from the CView::DoPreparePrinting() function,as shown in Listing C.6.</P><P>Obviously, any of the values in the PRINTDLG structure pInfo-&gt;m_pPD-&gt;m_pdcan be tested here also.</P><P><H4>TABLE C.2.&nbsp;CPrintDialog ACCESS FUNCTIONS.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"><I>Function Name</I></TD>		<TD ALIGN="LEFT"><I>Description</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetCopies()		</TD>		<TD ALIGN="LEFT">Returns the number of copies set by the user		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetFromPage()		</TD>		<TD ALIGN="LEFT">Returns the starting page as specified		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetToPage()		</TD>		<TD ALIGN="LEFT">Returns the last page as specified		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetPortName()		</TD>		<TD ALIGN="LEFT">Returns the selected printer port, for example, LPT1:		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetDriverName()		</TD>		<TD ALIGN="LEFT">Returns the selected print driver (destination printer)		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">GetPrinterDC()		</TD>		<TD ALIGN="LEFT">Returns a device context for the printer		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">PrintAll()		</TD>		<TD ALIGN="LEFT">Returns TRUE if all pages are selected		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">PrintCollate()		</TD>		<TD ALIGN="LEFT">Returns TRUE if collation is required		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">PrintRange()		</TD>		<TD ALIGN="LEFT">Returns TRUE if a range is specified		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">PrintSelection()		</TD>		<TD ALIGN="LEFT">Returns TRUE if a specific selection of pages is chosen		</TD>	</TR></TABLE><H4>LISTING C.6.&nbsp;&nbsp;LST23_6.CPP--VALIDATING THE STANDARD PRINT DIALOG BOXFOR A SPECIFIC NUMBER OF COPIES.</H4><PRE>1:  BOOL CPrintItView::OnPreparePrinting(CPrintInfo* pInfo)2:  {3:      pInfo-&gt;SetMinPage(1);4:      pInfo-&gt;SetMaxPage(10);5:6:      pInfo-&gt;m_pPD-&gt;m_pd.nCopies = 3;7:8:      do9:      {10:          // ** Check if user has cancelled print11:          if (DoPreparePrinting(pInfo) == FALSE)12:              return FALSE;13:14:          // ** Warn the user if too many copies             &Acirc;are specified15:          if (pInfo-&gt;m_pPD-&gt;GetCopies()&gt;5)16:              AfxMessageBox(&quot;Please choose less than                 &Acirc;5 copies&quot;);17:18:          // ** Keep looping until they specify a               &Acirc;valid number19:      } while(pInfo-&gt;m_pPD-&gt;GetCopies()&gt;5);20:      return TRUE;21:  }</PRE><P>In Listing C.6 the CView::DoPreparePrinting() returns FALSE if the user has pressedCancel in lines 11 and 12. Otherwise, the number of copies set is checked in line15, and a warning is issued if more than five copies have been selected (my arbitrarycriteria). The loop is repeated at line 19 until the user enters a valid number ofcopies or presses Cancel.</P><P><H3><A NAME="Heading10"></A>Using Portrait and Landscape Orientations</H3><P>If you click the File menu from the application and choose the Print Setup option,you can change the printer's orientation defaults. You can choose either Portraitor Landscape from the dialog. You don't need to make any code changes to handle Landscapeprinting; if you choose this option and then run a print preview, you should noticethat the device context is now drawn to the shape of the paper turned on its side.As long as your application takes note of the rectDraw member of the CPrintInfo object,it should be able to cope with landscape printing automatically.</P><P><H3><A NAME="Heading11"></A>Adding GDI Objects with OnBeginPrinting()</H3>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩va欧美va亚洲va久久| 日本精品一区二区三区四区的功能| 五月天国产精品| 亚洲精品你懂的| 亚洲精品中文在线| 亚洲与欧洲av电影| 亚洲午夜羞羞片| 午夜私人影院久久久久| 亚洲午夜视频在线观看| 亚洲18色成人| 一区二区三区免费| 一区二区国产视频| 亚洲一区二区三区四区在线| 亚洲午夜久久久久久久久电影院| 亚洲制服丝袜一区| 香蕉成人啪国产精品视频综合网 | 国产精品久久久久久久第一福利| 久久这里只有精品首页| 久久精品视频免费| 久久久99免费| 国产精品免费视频观看| 亚洲免费观看高清| 亚洲高清一区二区三区| 美国十次了思思久久精品导航| 久久精品国产一区二区| 国产一区二区三区观看| 国产a久久麻豆| 色就色 综合激情| 欧美精品久久99| 精品国产91亚洲一区二区三区婷婷 | 欧美亚洲国产一区二区三区va| 欧美午夜精品一区二区蜜桃 | 18成人在线视频| 依依成人综合视频| 五月激情综合色| 国产乱码精品一区二区三区av | 日韩高清中文字幕一区| 精品中文字幕一区二区| 国产成人精品一区二| 色狠狠综合天天综合综合| 欧美日韩国产美女| 久久久久九九视频| 一区二区三区在线视频观看58| 日本视频一区二区三区| 国产精品亚洲视频| 欧美亚州韩日在线看免费版国语版| 日韩一区二区三免费高清| 国产亚洲精品aa| 亚洲自拍都市欧美小说| 国产美女精品一区二区三区| 色综合久久中文综合久久97| 欧美电影免费观看高清完整版在线 | 久久国产精品露脸对白| 波多野结衣一区二区三区| 欧美亚一区二区| 久久无码av三级| 亚洲一区视频在线观看视频| 国产在线国偷精品产拍免费yy | 中文字幕在线播放不卡一区| 亚洲成av人**亚洲成av**| 国产高清在线精品| 欧美伦理电影网| 国产精品免费av| 激情综合网天天干| 欧美日韩一区三区| 国产精品成人免费在线| 秋霞午夜av一区二区三区| 91免费看`日韩一区二区| 欧美不卡123| 午夜伊人狠狠久久| 成人午夜在线播放| 日韩欧美一级二级三级| 亚洲一卡二卡三卡四卡 | 日韩欧美在线不卡| 亚洲精品videosex极品| 国产成人精品影视| 精品美女被调教视频大全网站| 亚洲综合一区在线| www.在线欧美| 国产亚洲精品bt天堂精选| 美女诱惑一区二区| 欧美欧美欧美欧美首页| 亚洲精品视频在线看| 国产成人精品免费视频网站| 日韩免费一区二区三区在线播放| 亚洲国产精品一区二区www| www.欧美日韩| 欧美国产日韩亚洲一区| 韩国av一区二区三区四区| 91麻豆精品国产91久久久久久久久 | 日本亚洲最大的色成网站www| 91视频免费观看| 中文字幕一区二区在线观看| 国产精品456| 国产亚洲精品7777| 国内精品久久久久影院薰衣草| 欧美一区二区三区在线视频| 亚洲h在线观看| 欧美视频在线一区二区三区 | 日韩久久免费av| 久久99国产精品麻豆| 91片在线免费观看| 日韩一级黄色大片| 欧美日本高清视频在线观看| 紧缚奴在线一区二区三区| 日韩精品一区第一页| 日韩欧美不卡在线观看视频| 综合久久给合久久狠狠狠97色 | 日韩美女视频在线| 国产毛片精品国产一区二区三区| 国产精品嫩草影院av蜜臀| 韩国一区二区视频| 成人免费视频在线观看| 极品销魂美女一区二区三区| 午夜免费久久看| 国产网站一区二区三区| 91欧美一区二区| 在线观看免费一区| 亚洲r级在线视频| 国产精品青草久久| 欧美日韩国产一区| 成人高清伦理免费影院在线观看| 91免费看片在线观看| 欧美日韩国产欧美日美国产精品| 欧美一区二区三区四区视频| 国产农村妇女毛片精品久久麻豆| 综合久久久久久久| 日本一区二区三区久久久久久久久不 | 亚洲女人的天堂| 91在线免费视频观看| 中文字幕永久在线不卡| 日韩精品一区二区三区视频播放 | 欧美探花视频资源| aaa欧美色吧激情视频| 欧美日韩高清一区二区| 天堂资源在线中文精品| 国产精品女主播在线观看| 亚洲一区二区三区国产| 美女一区二区在线观看| 97久久超碰国产精品电影| 日韩一区二区三区在线观看| 欧美性淫爽ww久久久久无| 日本在线不卡视频| 久久精品国产一区二区三区免费看| 一区二区三区在线观看视频| 高清成人免费视频| 亚洲综合在线第一页| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲综合在线五月| 精品久久久久一区二区国产| 亚洲图片欧美综合| 欧美精品一区二区久久婷婷 | 亚洲三级在线看| 紧缚奴在线一区二区三区| 卡一卡二国产精品| 欧美日韩在线一区二区| 中文字幕欧美国产| 国产麻豆成人传媒免费观看| 国产精品毛片大码女人| 亚洲欧美日韩国产手机在线 | 国产精品视频看| 国产一区二区三区最好精华液| 在线播放中文字幕一区| www.欧美精品一二区| 欧美国产欧美综合| 久久成人综合网| 欧美一区二区三区四区高清| 高清成人在线观看| 日本一区二区三区在线不卡| 亚洲欧洲日本在线| 亚洲一二三四在线观看| 一本色道久久综合亚洲91| 国产成人精品免费网站| 美腿丝袜亚洲综合| 依依成人精品视频| av高清久久久| 久久99国产精品久久99| 亚洲一区二区三区自拍| 在线观看亚洲精品| 91精品国产综合久久国产大片| 日韩精品色哟哟| 欧美一区二区二区| 色视频成人在线观看免| 中文字幕永久在线不卡| 精品999在线播放| 欧美日韩一区二区三区四区| 亚洲h动漫在线| 国产电影一区二区三区| 日本乱人伦一区| 不卡一区二区在线| 国产aⅴ综合色| 久久精品二区亚洲w码| 欧美国产日韩一二三区| 亚洲第一福利一区| 一区二区三区四区中文字幕| 欧美日韩成人综合在线一区二区| 偷窥国产亚洲免费视频| 日韩精品一区二区三区中文不卡 | 欧美午夜寂寞影院| 麻豆精品久久精品色综合|