home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MTHREAD.PAK / LINE.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  1KB  |  40 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //   Multi-thread MoveToLineTo demo window header
  4. //----------------------------------------------------------------------------
  5. #ifndef __LINE_H
  6. #define __LINE_H
  7.  
  8. #include "demobase.h"
  9.  
  10. // MoveToLineTo demo constants
  11. const int  MaxPoints    = 15;  // Number of points to be drawn 
  12. const int  IconicPoints = 6;   // Number of points to draw when iconized
  13.  
  14. struct TRPoint {
  15.   float X, Y;
  16. };
  17.  
  18. class TMoveToLineToWindow : public TBaseDemoWindow {
  19.   public:
  20.     TMoveToLineToWindow();
  21.  
  22.     void Paint(TDC& dc, BOOL, TRect&);
  23.  
  24.   protected:
  25.     void EvSize(UINT, TSize& Size);
  26.   
  27.   private:
  28.     TRPoint     Points[MaxPoints];
  29.     float       Rotation;     // in radians
  30.     int         PointCount;
  31.     BOOL        Iconized;
  32.     void        RotatePoints();
  33.  
  34.     void        DoRun();
  35.  
  36.   DECLARE_RESPONSE_TABLE(TMoveToLineToWindow);
  37. };
  38.  
  39. #endif
  40.