#0244 InvalidateRect(&rectInvalid);
#0245 return;
#0246 }
#0247 }
#0248 // We can"t interpret the hint; so assume that anything might
#0249 // have been updated。
#0250 Invalidate(TRUE);
#0251 return;
#0252 }
#0253
#0254 void CScribbleView::OnInitialUpdate()
#0255 {
#0256 SetScrollSizes(MM_LOENGLISH; GetDocument()…》GetDocSize());
#0257 CScrollView::OnInitialUpdate();
#0258 }
#0259
899
…………………………………………………………Page 962……………………………………………………………
第五篇 附錄
#0260 void CScribbleView::OnPrint(CDC* pDC; CPrintInfo* pInfo)
#0261 {
#0262 if (pInfo…》m_nCurPage == 1) // page no。 1 is the title page
#0263 {
#0264 PrintTitlePage(pDC; pInfo);
#0265 return; // nothing else to print on page 1 but the page title
#0266 }
#0267 CString strHeader = GetDocument()…》GetTitle();
#0268
#0269 PrintPageHeader(pDC; pInfo; strHeader);
#0270 // PrintPageHeader() subtracts out from the pInfo…》m_rectDraw the
#0271 // amount of the page used for the header。
#0272
#0273 pDC…》SetWindowOrg(pInfo…》m_rectDraw。left;…pInfo…》m_rectDraw。top);
#0274
#0275 // Now print the rest of the page
#0276 OnDraw(pDC);
#0277 }
#0278
#0279 void CScribbleView::PrintTitlePage(CDC* pDC; CPrintInfo* pInfo)
#0280 {
#0281 // Prepare a font size for displaying the file name
#0282 LOGFONT logFont;
#0283 memset(&logFont; 0; sizeof(LOGFONT));
#0284 logFont。lfHeight = 75; // 3/4th inch high in MM_LOENGLISH
#0285 // (1/100th inch)
#0286 CFont font;
#0287 CFont* pOldFont = NULL;
#0288 if (font。CreateFontIndirect(&logFont))
#0289 pOldFont = pDC…》SelectObject(&font);
#0290
#0291 // Get the file name; to be displayed on title page
#0292 CString strPageTitle = GetDocument()…》GetTitle();
#0293
#0294 // Display the file name 1 inch below top of the page;
#0295 // centered horizontally
#0296 pDC…》SetTextAlign(TA_CENTER);
#0297 pDC…》TextOut(pInfo…》m_rectDraw。right/2; …100; strPageTitle);
#0298
#0299 if (pOldFont != NULL)
#0300 pDC…》SelectObject(pOldFont);
#0301 }
#0302
#0303 void CScribbleView::PrintPageHeader(CDC* pDC; CPrintInfo* pInfo;
#0304 CString& strHeader)
#0305 {
900
…………………………………………………………Page 963……………………………………………………………
附錄B Scribble Step5 完整原始碼
#0306 // Print a page header consisting of the name of
#0307 // the document and a horizontal line
#0308 pDC…》SetTextAlign(TA_LEFT);
#0309 pDC…》TextOut(0;…25; strHeader); // 1/4 inch down
#0310
#0311 // Draw a line across the page; below the header
#0312 TEXTMETRIC textMetric;
#0313 pDC…》GetTextMetrics(&textMetric);
#0314 int y = …35 textMetric。tmHeight; // line 1/10th inch below text
#0315 pDC…》MoveTo(0; y); // from left margin
#0316 pDC…》LineTo(pInfo…》m_rectDraw。right; y); // to right margin
#0317
#0318 // Subtract out from the drawing rectange the space used by the header。
#0319 y …= 25; // space 1/4 inch below (top of) line
#0320 pInfo…》m_rectDraw。top += y;
#0321 }
PENDLG。H
#0001 class CPenWidthsDlg : public CDialog
#0002 {
#0003 // Construction
#0004 public:
#0005 CPenWidthsDlg(CWnd* pParent = NULL); // standard constructor
#0006
#0007 // Dialog Data
#0008 //{{AFX_DATA(CPenWidthsDlg)
#0009 enum { IDD = IDD_PEN_WIDTHS };
#0010 int m_nThinWidth;
#0011 int m_nThickWidth;
#0012 //}}AFX_DATA
#0013
#0014
#0015 // Overrides
#0016 // ClassWizard generated virtual function overrides
#0017 //{{AFX_VIRTUAL(CPenWidthsDlg)
#0018 protected:
#0019 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
#0020 //}}AFX_VIRTUAL
#0021
#0022 // Implementation
#0023 protected:
#0024
#0025 // Generated message map functions
#0026 //{{AFX_MSG(CPenWidthsDlg)
#0027 afx_msg void OnDefaultPenWidths();
901
…………………………………………………………Page 964……………………………………………………………
第五篇 附錄
#0028 //}}AFX_MSG
#0029 DECLARE_MESSAGE_MAP()
#0030 }
小说推荐
- Java编程思想第4版[中文版](PDF格式)
- -Page 1-Page 2《Thinking In Java》中文版作者:Bruce Eckel主页:http/BruceEckel.编译:Trans Bot主页:http/memberease~transbot致谢-献给那些直到现在仍在孜孜不倦创造下一代计算机语言的人们!指导您利用万维网的语言进
- 最新章:第295章
- VB2008从入门到精通(PDF格式英文版)
- -Page 1(R)The eXperT’s Voice inBeginningVB 2008From Novice to ProfessionalChristian Gross-Page 2-Page 3-Beginning VB 2008From Novice to Professional■C
- 最新章:第214章
- oracle从入门到精通(PDF格式)
- -Page 1-Oracle 从入门到精通-Page 2-资源来自网络,仅供学习 Oracle 从入门到精通一、SQL 8
- 最新章:第37章
- C语言游戏编程从入门到精通(PDF格式)
- -Page 1-Page 2-Page 3-Page 4-Page 5-Page 6-Page 7-Page 8-Page 9-Page 10-Page 11-Page 12-Page 13-Page 14
- 最新章:第4章
- 深入浅出
- 《深入浅出》作者:白小骨晋江VIP20140610完结+1番外非V章节总点击数:67370 总书评数:209 当前被收藏数:764 文章积分:11,386,657文案:每个前男友都是女人掉过的坑,从何典阳这个坑里往外爬的梁温暖一脸血表示,何典阳他这个深坑实在太坑爹。何典阳:我是坑?梁温暖…别看我,我
- 最新章:第74章
- 深入浅出[娱乐圈]
- 文案【忠犬影帝攻X傲娇明星受,1V1轻松甜文,前期互相试探,38章在一起后甜甜甜,两人都有细微的变化和成长~这也是我用心构思攻受感情发展的文,但数据有点太惨了,没入V可以全文免费看,还是想求点收藏呀,数据好看点吧,让我开心一下(笑哭.jpg)流量偶像白漾和影帝顾瑜祁关系很僵,传言两人出道时不合而互相
- 最新章:第59章
- JMS简明教程(PDF格式)
- -Page 1-JMS1.1规范中文版卫建军2007‐11‐22-Page 2
- 最新章:第28章
- SQL语言艺术(PDF格式)
- -Page 1-SQLSSQQLL语言艺术内容介绍本书分为12章,每一章包含许多原则或准则,并通过举例的方式对原则进行解释说明。这些例子大多来自于实际案例,对九种SQL经典查询场景以及其性能影响讨论,非常便于实践,为你数据库应用维护人员阅读。资深 SQL 专家 Stéphane Faroult倾力打
- 最新章:第27章
- C语言实例教程(PDF格式)
- -Page 1-前 言Visual C+是开发运行于Windows 95和Windows NT环境下的Win32应用程序的可视化编程工具中最重要的成员之一,它为软件开发人员提供了完整的编辑、编译和调试工具和建立于Win32 API(ApplicationProgramming Interface)基
- 最新章:第143章