home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / tedevkit / ter_mfc.h < prev    next >
C/C++ Source or Header  |  1994-11-21  |  3KB  |  81 lines

  1. // ter_mfc.h : header file
  2. //
  3.  
  4. #include "ter.h"
  5. #include "ter_cmd.h"
  6.  
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CTer window
  9.  
  10. class CTer : public CWnd
  11. {
  12.     DECLARE_DYNCREATE(CTer)
  13.  
  14. // Construction
  15. public:
  16.     CTer();
  17.     virtual BOOL Create(DWORD, const RECT &, CWnd *, UINT);
  18.  
  19. // Attributes
  20. public:
  21.     virtual DWORD DefaultEditStyles(); // return edit style constants (TER_)
  22.     BOOL          MenuEnable(int);     // TRUE if menu item should be enabled
  23.     int           MenuSelect(int);     // 0=unchecked, 1=checked
  24.  
  25. // Operations
  26. public:
  27.     virtual     ~CTer();
  28.     virtual void DeleteContents();
  29.     HGLOBAL      GetHandle(long far *);
  30.     BOOL         SetHandle(HGLOBAL,long,LPSTR,BOOL);
  31.     void         SerializeRaw(CArchive &ar);
  32.     virtual void Serialize(CArchive &ar);
  33.     void         ReadArchive(CArchive &ar, DWORD len);
  34.     void         WriteArchive(CArchive &ar);
  35.     void         Cut();
  36.     void         Copy();
  37.     void         Paste();
  38.     BOOL         CanUndo();
  39.     BOOL         Undo();
  40.     void         GetSel(long &StartPos,long &EndPos);
  41.     void         Clear();
  42.     BOOL         GetModify();
  43.     void         SetModify(BOOL bModified=TRUE);
  44.     long         GetLineCount();
  45.     long         LineIndex(long nLine=-1);
  46.     BOOL         SetReadOnly(BOOL bReadOnly=TRUE);
  47.     int          GetLine(long index, LPSTR buffer);
  48.     int          GetLine(long index, LPSTR buffer, int MaxLength);
  49.     long         GetFirstVisibleLine();
  50.     long         LineFromChar(long nIndex=-1);
  51.     int          LineLength(long nLine=-1);
  52.     void         LineScroll(long nLines, int nChars=0);
  53.     void         ReplaceSel(char huge *NewText);
  54.     void         SetSel(long nStartChar, long nEndChar, BOOL bNoScroll=FALSE);
  55.     void         TerMenu(WPARAM);
  56.  
  57. // Construction
  58. protected:
  59.     LRESULT      TerWindowProc(UINT,WPARAM,LPARAM);
  60.     WNDPROC      *GetSuperWndProcAddr();
  61.  
  62. // Implementation
  63. public:
  64.  
  65. protected:
  66.     HGLOBAL      m_hBuffer;   // handle to the retrieved buffer
  67.     DWORD        m_BufLen;    // buffer length
  68.  
  69.     DWORD        GetBuffer(); // retrieve the text buffer
  70.  
  71. // Generated message map functions
  72. protected:
  73.         //{{AFX_MSG(CTer)
  74.                 // NOTE - the ClassWizard will add and remove member functions here.
  75.         //}}AFX_MSG
  76.         
  77.         DECLARE_MESSAGE_MAP()
  78. };
  79.  
  80. /////////////////////////////////////////////////////////////////////////////
  81.