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

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

?? apc.htm

?? VisualC21天自學(xué)教程.rar 英文經(jīng)典教程
?? 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一区二区三区免费野_久草精品视频
av在线不卡观看免费观看| 国产自产高清不卡| 在线观看视频一区二区| 亚洲综合免费观看高清在线观看| 日本精品一区二区三区四区的功能| 亚洲欧洲综合另类| 欧美在线不卡一区| 五月天激情小说综合| 欧美成人高清电影在线| 成人深夜视频在线观看| 一区二区三区视频在线看| 欧美日韩国产美| 狠狠色狠狠色综合日日91app| 久久久久久电影| 色偷偷久久一区二区三区| 亚洲午夜久久久久中文字幕久| 538在线一区二区精品国产| 黄色小说综合网站| 专区另类欧美日韩| 欧美一区二区在线不卡| 国产老妇另类xxxxx| 国产精品国产三级国产专播品爱网| 欧美午夜精品久久久久久超碰| 日本亚洲天堂网| 国产精品视频一二三区| 欧美日韩精品电影| 国产91综合一区在线观看| 亚洲午夜久久久久久久久电影院| 欧美大片拔萝卜| 91麻豆产精品久久久久久 | 欧美二区乱c少妇| 国产乱子伦视频一区二区三区| 亚洲男人的天堂一区二区| 精品免费国产一区二区三区四区| 91视频在线观看| 久久国产精品第一页| 亚洲乱码日产精品bd| 久久欧美中文字幕| 91麻豆精品国产91久久久使用方法| 成人黄色a**站在线观看| 日本不卡一区二区三区高清视频| 国产精品欧美极品| 久久综合九色欧美综合狠狠 | 亚洲二区在线观看| 国产精品美女久久久久aⅴ| 日韩一区二区免费高清| 色综合久久99| 99久久久无码国产精品| 韩国视频一区二区| 美女网站在线免费欧美精品| 亚洲图片自拍偷拍| 国产精品福利影院| 国产日韩欧美精品一区| 欧美不卡视频一区| 91麻豆精品91久久久久同性| 在线观看av一区二区| 91香蕉视频污| 99久久久无码国产精品| 国产精华液一区二区三区| 美女高潮久久久| 麻豆成人在线观看| 日日夜夜精品视频免费| 一区二区激情视频| 亚洲欧美色一区| 亚洲精品国产精华液| 成人免费在线观看入口| 国产精品美女久久久久久久| 国产女主播一区| 欧美激情一区二区三区| 久久品道一品道久久精品| 欧美电视剧在线看免费| 日韩久久久精品| 日韩午夜在线影院| 精品国产sm最大网站免费看| 日韩三级视频在线看| 欧美成人在线直播| 欧美mv日韩mv亚洲| 久久综合九色综合欧美亚洲| 久久日韩粉嫩一区二区三区| 2020日本不卡一区二区视频| 久久免费视频色| 国产日产欧美一区二区视频| 中文字幕av免费专区久久| 国产精品每日更新| 亚洲精品成人悠悠色影视| 亚洲国产精品久久久男人的天堂| 亚洲午夜激情网站| 欧美96一区二区免费视频| 毛片基地黄久久久久久天堂| 国产乱淫av一区二区三区| 国产凹凸在线观看一区二区| 99热这里都是精品| 日本韩国精品在线| 欧美一区二区三区思思人| 精品久久久久久亚洲综合网| 国产精品天干天干在线综合| 亚洲人精品午夜| 日韩高清一级片| 国产精品自拍网站| 色婷婷国产精品久久包臀 | 麻豆国产欧美日韩综合精品二区| 国产一区二区三区国产| 成人污视频在线观看| 在线观看不卡一区| 日韩欧美国产高清| 国产精品久久久久久久久搜平片 | 亚洲免费资源在线播放| 亚洲mv在线观看| 国产乱子轮精品视频| 在线精品视频一区二区| 日韩精品在线看片z| 国产精品国产三级国产有无不卡 | 国产精品123| 欧美日韩中文字幕一区二区| 欧美电影精品一区二区| 亚洲日本va在线观看| 青草av.久久免费一区| 成人一道本在线| 91精品国产品国语在线不卡| 中文字幕国产精品一区二区| 亚洲二区视频在线| 成人一区二区在线观看| 欧美精品三级在线观看| 日韩一区在线看| 国产一区二区精品在线观看| 欧美日韩一区二区三区高清 | 色www精品视频在线观看| 日韩久久精品一区| 亚洲国产色一区| 成人av电影在线网| 精品久久一区二区三区| 亚洲午夜精品17c| 9人人澡人人爽人人精品| 精品久久99ma| 亚洲一区自拍偷拍| heyzo一本久久综合| 日韩精品一区二区在线观看| 亚洲成人在线免费| 91丨九色丨黑人外教| 国产欧美日韩不卡| 老司机免费视频一区二区| 欧美午夜精品久久久久久超碰| 国产精品久久三| 国产一区二区三区黄视频 | 美女视频黄频大全不卡视频在线播放| 99热在这里有精品免费| 久久精品免费在线观看| 久久99热99| 91精品国产欧美一区二区成人| 亚洲一区二区在线观看视频| 91视频在线看| 亚洲精选视频在线| 99riav久久精品riav| 中文无字幕一区二区三区| 韩国精品久久久| 精品1区2区在线观看| 蜜臀久久99精品久久久画质超高清 | 久久久精品国产免大香伊| 久久成人18免费观看| 日韩欧美中文字幕精品| 蜜臀va亚洲va欧美va天堂 | 欧洲av一区二区嗯嗯嗯啊| 亚洲日本护士毛茸茸| 色综合久久综合中文综合网| 亚洲欧美日韩国产中文在线| 色综合天天做天天爱| 亚洲另类春色校园小说| 欧美性生活久久| 亚洲成人资源网| 日韩视频在线你懂得| 狠狠色伊人亚洲综合成人| 国产欧美一区二区三区在线看蜜臀| 免费观看30秒视频久久| 精品日韩一区二区三区免费视频| 久久99九九99精品| 国产女同性恋一区二区| av不卡免费在线观看| 亚洲一区二区欧美激情| 91精品国产91久久综合桃花| 蜜臀av性久久久久蜜臀aⅴ | 奇米影视一区二区三区| 日韩美女一区二区三区| 高清不卡在线观看av| 一区二区三区精品| 欧美一区二区三级| 国产精品综合二区| 亚洲人成精品久久久久| 欧美绝品在线观看成人午夜影视| 午夜伊人狠狠久久| 精品国产91乱码一区二区三区| 成人美女视频在线看| 亚洲成a人v欧美综合天堂| 日韩欧美久久久| www.欧美亚洲| 青青草97国产精品免费观看无弹窗版| ww久久中文字幕| 欧洲在线/亚洲| 国模冰冰炮一区二区| 亚洲欧美日本韩国| 日韩女优制服丝袜电影|