home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / npp / npview.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  85 lines

  1. // npview.h : interface of the CNotepadView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. //
  13.  
  14. class CFindDlg;     // forward declarations
  15. class CGotoDlg;
  16.  
  17. #include "history.h"
  18.  
  19. class CNotepadView : public CEditView
  20. {
  21. protected: // create from serialization only
  22.     CNotepadView();
  23.     DECLARE_DYNCREATE(CNotepadView)
  24.  
  25. // Attributes
  26. public:
  27.     CNotepadDoc* GetDocument();
  28.  
  29. // Operations
  30. public:
  31.  
  32. // Overrides
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CNotepadView)
  35.     public:
  36.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  37.     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  38.     protected:
  39.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  40.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     //}}AFX_VIRTUAL
  43.  
  44. public:
  45. // Attributes
  46.     CFindDlg*    m_pFindDialog;             // find dialog
  47.     CGotoDlg*    m_pGotoDialog;             // goto line number dialog
  48.     CHistoryList m_searchHistory;           // last used search history list
  49.  
  50. public:
  51. // Operations
  52.     void OnViewFindNext(CString &s1);
  53.  
  54. // Implementation
  55. public:
  56.     virtual ~CNotepadView();
  57. #ifdef _DEBUG
  58.     virtual void AssertValid() const;
  59.     virtual void Dump(CDumpContext& dc) const;
  60. #endif
  61.  
  62. protected:
  63.  
  64. // Generated message map functions
  65. protected:
  66.     //{{AFX_MSG(CNotepadView)
  67.     afx_msg void OnEditGoto();
  68.     afx_msg void OnUpdateEditGoto(CCmdUI* pCmdUI);
  69.     afx_msg void OnEditFind();
  70.     afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
  71.     afx_msg void OnViewFindNext();
  72.     afx_msg void OnEditPaste();
  73.     afx_msg void OnEditCopy();
  74.     //}}AFX_MSG
  75.  
  76.     DECLARE_MESSAGE_MAP()
  77. };
  78.  
  79. #ifndef _DEBUG  // debug version in npview.cpp
  80. inline CNotepadDoc* CNotepadView::GetDocument()
  81.    { return (CNotepadDoc*)m_pDocument; }
  82. #endif
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85.