home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / GDIDEMO.ZIP / LINE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.1 KB  |  39 lines

  1. // ObjectWindows - (C) Copyright 1992 by Borland International
  2.  
  3. // 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 in MoveToLineToDemo */
  12. const int  IconicPoints = 6; /* Number of points to draw when iconized */
  13.  
  14. struct TRPoint {
  15.   float X, Y;
  16. };
  17.  
  18. _CLASSDEF(TMoveToLineToWindow)
  19.  
  20. class TMoveToLineToWindow : public TBaseDemoWindow
  21. {
  22. public:
  23.          TMoveToLineToWindow(PTWindowsObject AParent, LPSTR ATitle);
  24.          virtual LPSTR GetClassName() { return "LineDemoWindow"; };
  25.          virtual void GetWindowClass( WNDCLASS& WndClass );
  26.          virtual void Paint( HDC PaintDC, PAINTSTRUCT& PaintInfo );
  27.          virtual void TimerTick();
  28.          virtual void WMSize( TMessage &Message ) = [WM_FIRST + WM_SIZE];
  29. private:
  30.          TRPoint Points[ MaxPoints ];
  31.          float Rotation;     // in radians
  32.          int PointCount;
  33.          BOOL Iconized;
  34.          void RotatePoints();
  35.          void DrawPoints(HDC);
  36. };
  37.  
  38. #endif // ifndef __LINE_H
  39.