嗔秤戻幣�哉膵�云利匈嬉蝕湊蛸賜�塋床四衲���萩晦編報炎嘔囚^泡仟 ̄云利匈�《超噌�殻窟�嵌虜隆輓麈觚翹瀘卉韮�仍仍�。� 烏御危列
昂昂慕汐 卦指云慕朕村 厘議慕尺 厘議慕禰 TXT畠云和墮 序秘慕杏 紗秘慕禰

侮秘燃竃MFC及2井(PDF鯉塀)-及231嫗

梓囚徒貧圭�鮗� ○ 賜 ★ 辛酔堀貧和鍬匈��梓囚徒貧議 Enter 囚辛指欺云慕朕村匈��梓囚徒貧圭�鮗� ● 辛指欺云匈競何��
!!!!隆堋響頼��紗秘慕禰厮宴和肝写偬堋響��






                    SCRIBBLEVIEW。H 嶄��凪嶄議PrintPageHeader 壓和匯准双竃。 



                    class CScribbleView �此�public CScrollView 

                    �� 

                    public�此�

                               virtual void OnPrint��CDC* pDC�察�CPrintInfo* pInfo���察�

                               void PrintTitlePage��CDC* pDC�察�CPrintInfo* pInfo���察�

                               void PrintPageHeader��CDC* pDC�察�CPrintInfo* pInfo�察�CString& strHeader���察�

                      。。。 

                    �� 



                    #0001  void CScribbleView�今�OnPrint��CDC* pDC�察�CPrintInfo* pInfo�� 

                    #0002  �� 

                    #0003      if ��pInfo´〃m_nCurPage == 1��  // page no。 1 is the title page 

                    #0004      �� 

                    #0005              PrintTitlePage��pDC�察�pInfo���察�

                    #0006              return�察�// nothing else to print on page 1 but the page title 

                    #0007      �� 

                    #0008      CString strHeader = GetDocument�┌�´〃GetTitle�┌��察�

                    #0009 

                    #0010      PrintPageHeader��pDC�察�pInfo�察�strHeader���察�

                    #0011      // PrintPageHeader�┌� subtracts out from the pInfo´〃m_rectDraw the 

                    #0012      // amount of the page used for the header。 

                    #0013 

                    #0014      pDC´〃SetWindowOrg��pInfo´〃m_rectDraw。left�察�pInfo´〃m_rectDraw。top���察�

                    #0015 

                    #0016      // Now print the rest of the page 

                    #0017      OnDraw��pDC���察�

                    #0018  �� 

                    #0019 

                    #0020  void CScribbleView�今�PrintTitlePage��CDC* pDC�察�CPrintInfo* pInfo�� 

                    #0021  �� 

                    #0022      // Prepare a font size for displaying the file name 

                    #0023      LOGFONT logFont�察�

                    #0024      memset��&logFont�察�0�察�sizeof��LOGFONT�����察�

                    #0025      logFont。lfHeight = 75�察 �//  3/4th inch high in MM_LOENGLISH 

                    #0026                                                      // ��1/100th inch�� 

                    #0027      CFont font�察�

                    #0028      CFont* pOldFont = NULL�察�

                    #0029      if ��font。CreateFontIndirect��&logFont���� 

                    #0030              pOldFont = pDC´〃SelectObject��&font���察�

                    #0031 

                    #0032      // Get the file name�察�to be displayed on title page 

                    #0033      CString strPageTitle = GetDocument�┌�´〃GetTitle�┌��察�



694 


´´´´´´´´´´´´´´´´´´´´´´Page 757´´´´´´´´´´´´´´´´´´´´´´´

                                                        及 12 嫗    双咫�c�A咤А�



     #0034 

     #0035      // Display the file name 1 inch below top of the page�察�

     #0036      // centered horizontally 

     #0037      pDC´〃SetTextAlign��TA_CENTER���察�

     #0038      pDC´〃TextOut��pInfo´〃m_rectDraw。right/2�察 �100�察�strPageTitle���察�

     #0039 

     #0040      if ��pOldFont ��= NULL�� 

     #0041              pDC´〃SelectObject��pOldFont���察�

     #0042  �� 



燕遊嚥匈硫 



     猟周兆各參式猟周坪否議匈鷹哘乎嗤仇圭格�岾�栖。徳鳥貧短嗤諒籾��猟周兆各辛參竃 



     �嶬擺或擶衞癸�匈鷹辛參竃�嶬旌缶�双�撒�補竃欺嬉咫字貧扮��厘断祥哘乎譜柴猟周議 



    燕遊嚥匈硫��蛍艶喘栖慧崔猟周兆各嚥匈鷹��賜凪万販採低�誨�慧議彿創。�堡撮�軸聞 



     頁仝侭需軸侭誼々��壓嬉咫字補竃嚥徳鳥補竃曾圭中挽隼贋壓崛富宸劔議餓呟。 



     厘断譜柴阻総匯倖絹廁痕方��廨壇減夭双嬉咫遊��旺繍OnPrint 議歌方��匯倖嬉咫字DC �� 



    勧公万。嗤匯泣載否叟瓜策待��椎祥頁低駅誼壓OnPrint 距喘OnDraw 岻念距屁完笥議 



     圻泣才袈律��參閲窒乎匈議麼坪否委燕遊匈硫公固渠阻。 



     勣温灰瓜燕遊匈硫媼象議腎寂��辛參旋喘CPrintInfo 潤更嶄議m_rectDraw ��宸倖忖粁 



    芝村彭云匈議辛紙夕曝囃。厘断辛參壓補竃麼坪否岻念枠補竃燕遊匈硫��隼朔諏茅 



    m_rectDraw  膨圭侘議匯何芸��旗燕燕遊匈硫侭媼腎寂。OnPrint 匆辛參功象m_rectDraw 



     議方峙畳協嗤謹富坪否勣慧壓嬉咫匈議麼悶貧。 



     厘断封崛辛嬬咀葎燕遊匈硫議紗秘��遇俶勣俐個OnDraw��咀葎嬬校慧欺匯嫖嬉咫崕貧 



     議猟周坪否米駅繍咀葎燕遊匈硫議竃�峩�受富。音狛��珊挫云箭旺音頁宸倖劔徨。云箭 



     音譜匈硫��遇猟周寄弌壓MM_LOENGLISH  啌符庁塀和頁8 哂漆逅9 哂叱滷都斷屍 



     匈A4 崕嫖��210 x 297 巷舌��賜Letter Size  ��8´1/2 x 11 哂治�崕嫖嶄脅澗澗嗤噫 �



                                                                            695 


´´´´´´´´´´´´´´´´´´´´´´Page 758´´´´´´´´´´´´´´´´´´´´´´´

                  及鐙    侮秘  MFC  殻塀�O��    



                  #0001  void CScribbleView�今�PrintPageHeader��CDC* pDC�察�CPrintInfo* pInfo�察�

                  #0002          CString& strHeader�� 

                  #0003  �� 

                  #0004      // Print a page header consisting of the name of 

                  #0005      // the document and a horizontal line 

                  #0006      pDC´〃SetTextAlign��TA_LEFT���察�

                  #0007      pDC´〃TextOut��0�察�25�察�strHeader���察 �// 1/4 inch down 

                  #0008 

                  #0009      // Draw a line across the page�察�below the header 

                  #0010      TEXTMETRIC textMetric�察�

                  #0011      pDC´〃GetTextMetrics��&textMetric���察�

                  #0012      int y = ´35 textMetric。tmHeight�察   �// line 1/10th inch below text 

                  #0013      pDC´〃MoveTo��0�察�y���察                           �// from left margin 

                  #0014      pDC´〃LineTo��pInfo´〃m_rectDraw。right�察�y���察 �// to right margin 

                  #0015 

                  #0016      // Subtract out from the drawing rectange the space used by the header。 

                  #0017      y ´= 25�察   �// space 1/4 inch below ��top of�� line 

                  #0018      pInfo´〃m_rectDraw。top ��= y�察�

                  #0019  �� 



             強蓑柴麻匈鷹 



                  蝶乂秤趨和View 窃艶壓蝕兵嬉咫岻念短一隈並枠岑祇Document  議海業。 



                  邪譜低議�
卦指朕村 貧匯匈 和匯匈 指欺競何 壘��1�� 家��1��
隆堋響頼��紗秘慕禰厮宴和肝写偬堋響��
梁椣戻幣�� 梁心弌傍議揖扮窟燕得胎��傍竃徭失議心隈才凪万弌誌育断蛍�輌臆惨軼僑〃�燕慕得珊辛參資誼持蛍才将刮襲潜��範寔亟圻幹慕得 瓜寡追葎娼得辛參資誼寄楚署衛、持蛍才将刮襲潜填��