home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / WORDPAD.PAK / WORDPVW.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  3.6 KB  |  118 lines

  1. // wordpvw.h : interface of the CWordPadView class
  2. //
  3. //
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1995 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. class CWordPadView : public CRichEditView
  15. {
  16. protected: // create from serialization only
  17.     CWordPadView();
  18.     DECLARE_DYNCREATE(CWordPadView)
  19.  
  20. // Attributes
  21. public:
  22.     UINT m_uTimerID;
  23.     BOOL m_bDelayUpdateItems;
  24.     BOOL m_bInPrint;
  25.     CParaFormat m_defParaFormat;
  26.     CCharFormat m_defCharFormat;
  27.     CCharFormat m_defTextCharFormat;
  28.  
  29.     CWordPadDoc* GetDocument();
  30.     BOOL IsFormatText();
  31.  
  32.     virtual HMENU GetContextMenu(WORD seltype, LPOLEOBJECT lpoleobj, 
  33.         CHARRANGE* lpchrg);
  34.  
  35. // Operations
  36. public:
  37.     BOOL PasteNative(LPDATAOBJECT lpdataobj);
  38.     void SetDefaultFont(BOOL bText);
  39.     void SetUpdateTimer();
  40.     void GetDefaultFont(CCharFormat& cf, UINT nFontNameID);
  41.     void DrawMargins(CDC* pDC);
  42.     BOOL SelectPalette();
  43.  
  44. // Overrides
  45.     // ClassWizard generated virtual function overrides
  46.     //{{AFX_VIRTUAL(CWordPadView)
  47.     protected:
  48.     virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
  49.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  50.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  51.     //}}AFX_VIRTUAL
  52.     BOOL OnPreparePrinting(CPrintInfo* pInfo);
  53.     virtual HRESULT GetClipboardData(CHARRANGE* lpchrg, DWORD reco, 
  54.         LPDATAOBJECT lpRichDataObj,    LPDATAOBJECT* lplpdataobj);
  55.     virtual HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, 
  56.         BOOL, HGLOBAL);
  57. public:
  58.     virtual void WrapChanged();
  59.  
  60. // Implementation
  61. public:
  62. #ifdef _DEBUG
  63.     virtual void AssertValid() const;
  64.     virtual void Dump(CDumpContext& dc) const;
  65. #endif
  66.  
  67. protected:
  68.     BOOL m_bOnBar;
  69.  
  70.     // OLE Container support
  71.  
  72.     virtual void DeleteContents();
  73.     virtual void OnTextNotFound(LPCTSTR);
  74.  
  75. // Generated message map functions
  76. protected:
  77.     afx_msg void OnCancelEditSrvr();
  78.     //{{AFX_MSG(CWordPadView)
  79.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  80.     afx_msg void OnPageSetup();
  81.     afx_msg void OnInsertDateTime();
  82.     afx_msg void OnFormatParagraph();
  83.     afx_msg void OnFormatTabs();
  84.     afx_msg void OnTimer(UINT nIDEvent);
  85.     afx_msg void OnDestroy();
  86.     afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
  87.     afx_msg void OnPenBackspace();
  88.     afx_msg void OnPenNewline();
  89.     afx_msg void OnPenPeriod();
  90.     afx_msg void OnPenSpace();
  91.     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  92.     afx_msg void OnFilePrint();
  93.     afx_msg void OnPenLens();
  94.     afx_msg void OnPenTab();
  95.     afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
  96.     afx_msg BOOL OnQueryNewPalette();
  97.     afx_msg void OnWinIniChange(LPCTSTR lpszSection);
  98.     afx_msg void OnSize(UINT nType, int cx, int cy);
  99.     //}}AFX_MSG
  100.     afx_msg void OnEditChange();
  101.     afx_msg void OnColorPick(UINT nID);
  102.     afx_msg int OnMouseActivate(CWnd* pWnd, UINT nHitTest, UINT message);
  103.     afx_msg LONG OnPrinterChangedMsg(UINT, LONG);
  104.     afx_msg void OnGetCharFormat(NMHDR* pNMHDR, LRESULT* pRes);
  105.     afx_msg void OnSetCharFormat(NMHDR* pNMHDR, LRESULT* pRes);
  106.     afx_msg void OnBarSetFocus(NMHDR*, LRESULT*);
  107.     afx_msg void OnBarKillFocus(NMHDR*, LRESULT*);
  108.     afx_msg void OnBarReturn(NMHDR*, LRESULT* );
  109.     DECLARE_MESSAGE_MAP()
  110. };
  111.  
  112. #ifndef _DEBUG  // debug version in wordpvw.cpp
  113. inline CWordPadDoc* CWordPadView::GetDocument()
  114.    { return (CWordPadDoc*)m_pDocument; }
  115. #endif
  116.  
  117. /////////////////////////////////////////////////////////////////////////////
  118.