home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / tvision / mess1 / myview.h < prev   
Encoding:
C/C++ Source or Header  |  1992-01-31  |  1.4 KB  |  63 lines

  1. //========================================================================
  2. //  The following example routines have been provided by the Technical
  3. //  Support staff at Borland International.  They are provided as a
  4. //  courtesy and not as part of a Borland product, and as such, are
  5. //  provided without the assurance of technical support or any specific
  6. //  guarantees.
  7. //========================================================================
  8. //  Turbo Vision - Example of message passing
  9. //
  10. //------------------------------------------------------------------------
  11. //
  12. // myview.h:  The class definition for TMyView.
  13. //
  14. //========================================================================
  15.  
  16.  
  17.  
  18. #ifndef _MYVIEW_H
  19. #define _MYVIEW_H
  20.  
  21. #define Uses_TView
  22. #define Uses_TRect
  23. #define Uses_TEvent
  24. #include <tv.h>
  25.  
  26.  
  27. //
  28. // struct techInfoRec - Stores a record for information about a technicion.
  29. //
  30.  
  31. struct techInfoRec
  32. {
  33.   char name[21];
  34.   char ext[5];
  35.   ushort bbs;
  36.   ushort interest;
  37. };
  38.  
  39.  
  40. //
  41. // TMyView - A view to display my name in a view.
  42. //
  43.  
  44. class TMyView : public TView
  45. {
  46. public:
  47.     TMyView(TRect);
  48.     ~TMyView();
  49.     void handleEvent(TEvent&);
  50.     void draw();
  51.     Boolean valid(ushort);
  52. protected:
  53.     void addRecord(techInfoRec *);
  54. private:
  55.     techInfoRec **records;
  56.     ushort numRecords;
  57.     ushort maxRecords;
  58.     Boolean isValid;
  59. };
  60.  
  61.  
  62. #endif
  63.