home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1995 March / PCD_395.iso / starview / wntmsci / german / about4.cx_ / ABOUT4.CXX
Encoding:
C/C++ Source or Header  |  1994-01-18  |  1.2 KB  |  42 lines

  1. /*******************************************************************
  2. *  ABOUT4.CXX
  3. *  (c) 1992-1994 STAR DIVISION
  4. *******************************************************************/
  5.  
  6. #include <sv.hxx>
  7.  
  8. #include "about4.hrc"
  9. #include "about4.hxx"
  10.  
  11. // --- AboutBox::AboutBox() ----------------------------------------
  12.  
  13. AboutBox::AboutBox( Window* pParent ) :
  14.           ModalDialog( pParent, ResId( RID_ABOUTBOX ) ),
  15.           aText( this, ResId( RID_TEXT ) ),
  16.           aOKButton( this, ResId( RID_OK ) )
  17. {
  18.     FreeResource();
  19. }
  20.  
  21. // --- AboutBox::Paint() -------------------------------------------
  22.  
  23. void AboutBox::Paint( const Rectangle& )
  24. {
  25.     Brush   aOldBrush;
  26.     Point   aPointAry[3];
  27.     aPointAry[0] = Point( 110,70 );
  28.     aPointAry[1] = Point( 140,30 );
  29.     aPointAry[2] = Point( 170,70 );
  30.  
  31.     aOldBrush = ChangeFillInBrush( Brush( Color( COL_RED ) ) );
  32.     DrawRect( Rectangle( Point( 20, 10 ), Point( 80, 50 ) ) );
  33.  
  34.     ChangeFillInBrush( Brush( Color( COL_BLUE ) ) );
  35.     DrawEllipse( Rectangle( Point( 60, 20 ), Point( 130, 60 ) ) );
  36.  
  37.     ChangeFillInBrush( Brush( Color( COL_GREEN ) ) );
  38.     DrawPolygon( Polygon( 3, aPointAry ) );
  39.  
  40.     ChangeFillInBrush( aOldBrush );
  41. }
  42.