ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡ÔĶÁ¹ý³Ì·¢ÏÖÈκδíÎóÇë¸æËßÎÒÃÇ£¬Ð»Ð»£¡£¡ ±¨¸æ´íÎó
Ò»ÊÀÊé³Ç ·µ»Ø±¾ÊéĿ¼ ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ½øÈëÊé°É ¼ÓÈëÊéÇ©

ÉîÈëdz³öMFCµÚ2°æ(PDF¸ñʽ)-µÚ221ÕÂ

°´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³£¬°´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ£¬°´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿£¡
¡ª¡ª¡ª¡ªÎ´ÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡




¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0177¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£DPtoLP£¨&point£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0178¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0179¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CPen*¡¡pOldPen¡¡=¡¡dc¡£SelectObject£¨pDoc¡­¡·GetCurrentPen£¨£©£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0180¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£MoveTo£¨m_ptPrev£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0181¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£LineTo£¨point£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0182¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£SelectObject£¨pOldPen£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0183¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡m_pStrokeCur¡­¡·m_pointArray¡£Add£¨point£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0184¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0185¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡Tell¡¡the¡¡stroke¡¡item¡¡that¡¡we're¡¡done¡¡adding¡¡points¡¡to¡¡it¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0186¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡This¡¡is¡¡so¡¡it¡¡can¡¡finish¡¡puting¡¡its¡¡bounding¡¡rectangle¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0187¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡m_pStrokeCur¡­¡·FinishStroke£¨£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0188¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0189¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡Tell¡¡the¡¡other¡¡views¡¡that¡¡this¡¡stroke¡¡has¡¡been¡¡added¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0190¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡so¡¡that¡¡they¡¡can¡¡invalidate¡¡this¡¡stroke's¡¡area¡¡in¡¡their¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0191¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡client¡¡area¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0192¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡pDoc¡­¡·UpdateAllViews£¨this£»¡¡0L£»¡¡m_pStrokeCur£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0193¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0194¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ReleaseCapture£¨£©£»¡¡¡¡¡¡//¡¡Release¡¡the¡¡mouse¡¡capture¡¡established¡¡at¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0195¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡the¡¡beginning¡¡of¡¡the¡¡mouse¡¡drag¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0196¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡return£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0197¡¡¡¡£ý¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0198¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0199¡¡¡¡void¡¡CScribbleView£º£ºOnMouseMove£¨UINT£»¡¡CPoint¡¡point£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0200¡¡¡¡£û¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0201¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡Mouse¡¡movement¡¡is¡¡interesting¡¡in¡¡the¡¡Scribble¡¡application¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0202¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡only¡¡if¡¡the¡¡user¡¡is¡¡currently¡¡drawing¡¡a¡¡new¡¡stroke¡¡by¡¡dragging¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0203¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡the¡¡captured¡¡mouse¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0204¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0205¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if¡¡£¨GetCapture£¨£©¡¡£¡=¡¡this£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0206¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡return£»¡¡//¡¡If¡¡this¡¡window¡¡£¨view£©¡¡didn't¡¡capture¡¡the¡¡mouse£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0207¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡then¡¡the¡¡user¡¡isn't¡¡drawing¡¡in¡¡this¡¡window¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0208¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0209¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CClientDC¡¡dc£¨this£©£»¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0210¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡CScrollView¡¡changes¡¡the¡¡viewport¡¡origin¡¡and¡¡mapping¡¡mode¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0211¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡It's¡¡necessary¡¡to¡¡convert¡¡the¡¡point¡¡from¡¡device¡¡coordinates¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0212¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡to¡¡logical¡¡coordinates£»¡¡such¡¡as¡¡are¡¡stored¡¡in¡¡the¡¡document¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡#0213¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡OnPrepareDC£¨&dc£©£»¡¡



898¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡961¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¸½ä›£Â¡¡¡¡¡¡¡¡Scribble¡¡Step5¡¡¡¡ÍêÕûԭʼ´a¡¡



#0214¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£DPtoLP£¨&point£©£»¡¡

#0215¡¡

#0216¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡m_pStrokeCur¡­¡·m_pointArray¡£Add£¨point£©£»¡¡

#0217¡¡

#0218¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡Draw¡¡a¡¡line¡¡from¡¡the¡¡previous¡¡detected¡¡point¡¡in¡¡the¡¡mouse¡¡

#0219¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡drag¡¡to¡¡the¡¡current¡¡point¡£¡¡

#0220¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CPen*¡¡pOldPen¡¡=¡¡dc¡£SelectObject£¨GetDocument£¨£©¡­¡·GetCurrentPen£¨£©£©£»¡¡

#0221¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£MoveTo£¨m_ptPrev£©£»¡¡

#0222¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£LineTo£¨point£©£»¡¡

#0223¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£SelectObject£¨pOldPen£©£»¡¡

#0224¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡m_ptPrev¡¡=¡¡point£»¡¡

#0225¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡return£»¡¡

#0226¡¡¡¡£ý¡¡

#0227¡¡

#0228¡¡¡¡void¡¡CScribbleView£º£ºOnUpdate£¨CView*¡¡/*¡¡pSender¡¡*/£»¡¡LPARAM¡¡/*¡¡lHint¡¡*/£»¡¡

#0229¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CObject*¡¡pHint£©¡¡

#0230¡¡¡¡£û¡¡

#0231¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡The¡¡document¡¡has¡¡informed¡¡this¡¡view¡¡that¡¡some¡¡data¡¡has¡¡changed¡£¡¡

#0232¡¡

#0233¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if¡¡£¨pHint¡¡£¡=¡¡NULL£©¡¡

#0234¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£û¡¡

#0235¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if¡¡£¨pHint¡­¡·IsKindOf£¨RUNTIME_CLASS£¨CStroke£©£©£©¡¡

#0236¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£û¡¡

#0237¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡The¡¡hint¡¡is¡¡that¡¡a¡¡stroke¡¡as¡¡been¡¡added¡¡£¨or¡¡changed£©¡£¡¡

#0238¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡So£»¡¡invalidate¡¡its¡¡rectangle¡£¡¡

#0239¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CStroke*¡¡pStroke¡¡=¡¡£¨CStroke*£©pHint£»¡¡

#0240¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CClientDC¡¡dc£¨this£©£»¡¡

#0241¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡OnPrepareDC£¨&dc£©£»¡¡

#0242¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CRect¡¡rectInvalid¡¡=¡¡pStroke¡­¡·GetBoundingRect£¨£©£»¡¡

#0243¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dc¡£LPtoDP£¨&rectInvalid£©£»¡¡

#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¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¸½ä›£Â¡¡¡¡¡¡¡¡Scribble¡¡Step5¡¡¡¡ÍêÕûԭʼ´a¡¡



#0306¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡Print¡¡a¡¡page¡¡header¡¡consisting¡¡of¡¡the¡¡name¡¡of¡¡

#0307¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡//¡¡the¡¡document¡¡and¡¡a¡¡horizontal¡¡line¡¡

#0308¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡pDC¡­¡·SetTextAlign£¨TA_LEFT£©£»¡¡

#0309¡¡¡¡
·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨0£© ²È£¨1£©
δÔĶÁÍꣿ¼ÓÈëÊéÇ©ÒѱãÏ´μÌÐøÔĶÁ£¡
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡