home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pwrgu2.zip / POWERGU2.EXE / CANVAS / SPLITTXT / SPLITTXT.CPP < prev    next >
Text File  |  1995-07-25  |  1KB  |  41 lines

  1. //************************************************************
  2. // Canvas - ISplitCanvas with Static Text Child Windows
  3. //
  4. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  5. // All Rights Reserved.
  6. //************************************************************
  7. #include <ibmpctl.hpp>
  8. #include <iframe.hpp>
  9. #include <iapp.hpp>
  10. #include <isplitcv.hpp>
  11. #include <istattxt.hpp>
  12. #include <icconst.h>
  13.  
  14. void main ( )
  15. {
  16.   IFrameWindow frame( "Split canvas example" );
  17.   ISplitCanvas client( IC_FRAME_CLIENT_ID, &frame, &frame );
  18.   frame.setClient( &client );
  19.  
  20.   // Create five child windows.
  21.   IStaticText st1( 1, &client, &client ),
  22.               st2( 2, &client, &client );
  23.   IBitmapControl bmp( 3, &client, &client,
  24.                       ISystemBitmapHandle::systemMenu );
  25.   IStaticText st4( 4, &client, &client ),
  26.               st5( 5, &client, &client );
  27.   st1.setText( "First" )
  28.      .setAlignment( IStaticText::centerCenter );
  29.   st2.setText( "Second" )
  30.      .setAlignment( IStaticText::centerCenter );
  31.   st4.setText( "Fourth" )
  32.      .setAlignment( IStaticText::centerCenter );
  33.   st5.setText( "Fifth" )
  34.      .setAlignment( IStaticText::centerCenter );
  35.  
  36.   // Size and show the window now.
  37.   frame.setFocus()
  38.        .show();
  39.   IApplication::current().run();
  40. }
  41.