home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * ABOUT3.CXX
- * (c) 1992-1994 STAR DIVISION
- *******************************************************************/
-
- #include <sv.hxx>
-
- #include "about3.hxx"
-
- // --- AboutBox::AboutBox() ----------------------------------------
-
- AboutBox::AboutBox( Window* pParent ) :
- ModalDialog( pParent, WB_STDMODAL ),
- aText( this, WB_CENTER ),
- aOKButton( this, WB_DEFBUTTON | WB_TABSTOP )
- {
- SetText( "Paint" );
- ChangeOutputSizePixel( Size( 200, 180 ) );
-
- aText.SetText( "StarView Paint\n"
- "(c) STAR DIVISION\n"
- "1992-1994" );
- aText.ChangePosPixel( Point( 25, 80 ) );
- aText.ChangeSizePixel( Size( 150, 50 ) );
- aText.Show();
-
- aOKButton.ChangePosPixel( Point( 65, 135 ) );
- aOKButton.ChangeSizePixel( Size( 70, 25 ) );
- aOKButton.Show();
- }
-
- // --- AboutBox::Paint() -------------------------------------------
-
- void AboutBox::Paint( const Rectangle& )
- {
- Brush aOldBrush;
- Point aPointAry[3];
- aPointAry[0] = Point( 110,70 );
- aPointAry[1] = Point( 140,30 );
- aPointAry[2] = Point( 170,70 );
-
- aOldBrush = ChangeFillInBrush( Brush( Color( COL_RED ) ) );
- DrawRect( Rectangle( Point( 20, 10 ), Point( 80, 50 ) ) );
-
- ChangeFillInBrush( Brush( Color( COL_BLUE ) ) );
- DrawEllipse( Rectangle( Point( 60, 20 ), Point( 130, 60 ) ) );
-
- ChangeFillInBrush( Brush( Color( COL_GREEN ) ) );
- DrawPolygon( Polygon( 3, aPointAry ) );
-
- ChangeFillInBrush( aOldBrush );
- }
-