home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
- * EXAMPLE1.CXX
- * (c) 1992 STAR DIVISION
- *******************************************************************/
-
- #include <sv.hxx>
-
- // --- class MyApp -------------------------------------------------
-
- class MyApp : public Application
- {
- public:
- virtual void Main( int, char*[] );
- };
-
- // --- class MyWin -------------------------------------------------
-
- class MyWin : public WorkWindow
- {
- public:
- MyWin( Window* pParent, WinBits nWinStyle ) :
- WorkWindow( pParent, nWinStyle ) {}
-
- virtual void Paint( const Rectangle& );
- };
-
- // --- MyWin::Paint() ----------------------------------------------
-
- void MyWin::Paint( const Rectangle& )
- {
- DrawText( Point( 15, 15 ), "Hello World !" );
- }
-
- // --- MyApp::Main() -----------------------------------------------
-
- void MyApp::Main( int, char*[] )
- {
- MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
-
- aMainWin.SetText( "StarView Hello World" );
- aMainWin.Show();
-
- Execute();
- }
-
- // --- aMyApp ------------------------------------------------------
-
- MyApp aMyApp;
-
- #ifdef MAC
- Application* pApp = &aMyApp;
- #endif
-