home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * ABOUT3.CXX
- * (c) 1992 STAR DIVISION
- *******************************************************************/
-
- #include <sv.hxx>
-
- #include "about3.hxx"
-
- // --- AboutBox::AboutBox() ----------------------------------------
-
- AboutBox::AboutBox( Window* pParent ) :
- ModalDialog( pParent, WB_STDMODAL ),
- aText( this, WB_CENTER ),
- aButton( this, WB_TABSTOP )
- {
- SetText( "Paint" );
- ChangePosPixel( Point( 100, 100 ) );
- ChangeSizePixel( Size( 200, 200 ) );
-
- aText.SetText( "StarView Paint\n"
- "(c) STAR DIVISION\n"
- "1992" );
- aText.ChangePosPixel( Point( 25, 80 ) );
- aText.ChangeSizePixel( Size( 150, 50 ) );
- aText.Show();
-
- aButton.SetText( "~OK" );
- aButton.ChangePosPixel( Point( 65, 135 ) );
- aButton.ChangeSizePixel( Size( 70, 25 ) );
- aButton.ChangeClickHdl( LINK( this, AboutBox::ButtonHdl ) );
- aButton.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( 3, aPointAry );
-
- ChangeFillInBrush( aOldBrush );
- }
-
- // --- AboutBox::ButtonHdl() ---------------------------------------
-
- void AboutBox::ButtonHdl( Button* )
- {
- EndDialog();
- }
-