home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1995 March / PCD_395.iso / starview / pm2csci / german / about3.cx_ / ABOUT3.CXX
Encoding:
C/C++ Source or Header  |  1994-01-18  |  1.6 KB  |  53 lines

  1. /*******************************************************************
  2. *  ABOUT3.CXX
  3. *  (c) 1992-1994 STAR DIVISION
  4. *******************************************************************/
  5.  
  6. #include <sv.hxx>
  7.  
  8. #include "about3.hxx"
  9.  
  10. // --- AboutBox::AboutBox() ----------------------------------------
  11.  
  12. AboutBox::AboutBox( Window* pParent ) :
  13.           ModalDialog( pParent, WB_STDMODAL ),
  14.           aText( this, WB_CENTER ),
  15.           aOKButton( this, WB_DEFBUTTON | WB_TABSTOP )
  16. {
  17.     SetText( "Paint" );
  18.     ChangeOutputSizePixel( Size( 200, 180 ) );
  19.  
  20.     aText.SetText( "StarView Paint\n"
  21.                    "(c) STAR DIVISION\n"
  22.                    "1992-1994" );
  23.     aText.ChangePosPixel( Point( 25, 80 ) );
  24.     aText.ChangeSizePixel( Size( 150, 50 ) );
  25.     aText.Show();
  26.  
  27.     aOKButton.ChangePosPixel( Point( 65, 135 ) );
  28.     aOKButton.ChangeSizePixel( Size( 70, 25 ) );
  29.     aOKButton.Show();
  30. }
  31.  
  32. // --- AboutBox::Paint() -------------------------------------------
  33.  
  34. void AboutBox::Paint( const Rectangle& )
  35. {
  36.     Brush   aOldBrush;
  37.     Point   aPointAry[3];
  38.     aPointAry[0] = Point( 110,70 );
  39.     aPointAry[1] = Point( 140,30 );
  40.     aPointAry[2] = Point( 170,70 );
  41.  
  42.     aOldBrush = ChangeFillInBrush( Brush( Color( COL_RED ) ) );
  43.     DrawRect( Rectangle( Point( 20, 10 ), Point( 80, 50 ) ) );
  44.  
  45.     ChangeFillInBrush( Brush( Color( COL_BLUE ) ) );
  46.     DrawEllipse( Rectangle( Point( 60, 20 ), Point( 130, 60 ) ) );
  47.  
  48.     ChangeFillInBrush( Brush( Color( COL_GREEN ) ) );
  49.     DrawPolygon( Polygon( 3, aPointAry ) );
  50.  
  51.     ChangeFillInBrush( aOldBrush );
  52. }
  53.