home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 December / PCWKCD1296.iso / vjplusb / activex / inetsdk / samples / urlpad / padview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-29  |  2.9 KB  |  112 lines

  1. //=------------------------------------------------------------------------=
  2. // PadView.h
  3. //=------------------------------------------------------------------------=
  4. // Copyright 1992-1996 Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // Definition of the CPadView class
  13. //
  14.  
  15. #ifndef __PADVIEW_H__
  16. #define __PADVIEW_H__
  17.  
  18. #include <afxdlgs.h>
  19. #include <afxext.h>
  20. #include "paddoc.h"
  21.  
  22. class CPadView : public CEditView
  23. {
  24.     DECLARE_DYNCREATE(CPadView)
  25.  
  26. // Construction
  27.     CPadView();
  28.     BOOL PreCreateWindow(CREATESTRUCT& cs);
  29.  
  30. // Attributes
  31. public:
  32.     // static init/term...
  33.     static void Initialize();
  34.     static void Terminate();
  35.  
  36.     CPadDoc* GetDocument()
  37.         { return (CPadDoc*)m_pDocument; }
  38.  
  39. // Operations
  40. public:
  41.     // Word wrap...
  42.     BOOL IsWordWrap() const;
  43.     BOOL SetWordWrap(BOOL bWordWrap);
  44.  
  45.     // Printing...
  46.     virtual void OnPrint(CDC* pDC, CPrintInfo *pInfo);
  47.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  48.     virtual void OnScrollTo(CDC* pDC, CPrintInfo* pInfo, POINT point);
  49.  
  50.     // Buffer access...
  51.     LPCTSTR LockBuffer() const
  52.         { return CEditView::LockBuffer(); }
  53.     void UnlockBuffer() const
  54.         { CEditView::UnlockBuffer(); }
  55.  
  56. // Implementation
  57. public:
  58.     BOOL IsUpdatePending() {return (m_uTimerID != NULL);}
  59.  
  60. #ifdef _DEBUG
  61.     virtual void AssertValid() const;
  62.     virtual void Dump(CDumpContext& dc) const;
  63. #endif
  64.  
  65. protected:
  66.     UINT m_uTimerID; // ==0 when no outstanding
  67.  
  68.     static LOGFONT NEAR m_lfDefFont;
  69.     static LOGFONT NEAR m_lfDefFontOld;
  70.     CFont m_font;
  71.  
  72.     static LOGFONT NEAR m_lfDefPrintFont;
  73.     static LOGFONT NEAR m_lfDefPrintFontOld;
  74.     CFont m_fontPrint;
  75.  
  76.     static UINT m_nDefTabStops;
  77.     static UINT m_nDefTabStopsOld;
  78.     static BOOL m_bDefWordWrap;
  79.     static BOOL m_bDefWordWrapOld;
  80.  
  81.     UINT m_nPreviewPage;
  82.     CTime m_timeHeader;
  83.     CTime m_timeFooter;
  84.  
  85.     //{{AFX_MSG(CPadView)
  86.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  87.     afx_msg void OnChooseFont();
  88.     afx_msg void OnWordWrap();
  89.     afx_msg void OnUpdateWordWrap(CCmdUI* pCmdUI);
  90.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  91.     afx_msg void OnChoosePrintFont();
  92.     afx_msg void OnMirrorDisplayFont();
  93.     afx_msg void OnUpdateMirrorDisplayFont(CCmdUI* pCmdUI);
  94.     afx_msg void OnUpdateChoosePrintFont(CCmdUI* pCmdUI);
  95.     afx_msg void OnSize(UINT nType, int cx, int cy);
  96.     afx_msg void OnEditChange();
  97.     afx_msg void OnEditCopy();
  98.     afx_msg void OnEditCut();
  99.     afx_msg void OnTimer(UINT nIDEvent);
  100.     //}}AFX_MSG
  101.  
  102.     #ifndef _MAC
  103.         afx_msg void OnSetTabStops();
  104.     #endif
  105.  
  106.     DECLARE_MESSAGE_MAP()
  107. };
  108.  
  109. #endif  // __PADVIEW_H__
  110.  
  111. /////////////////////////////////////////////////////////////////////////////
  112.