home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / fonts / simple / simple.cpp < prev   
Text File  |  1996-10-29  |  1KB  |  37 lines

  1. //************************************************************
  2. // Fonts - Simple Font Example
  3. //
  4. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  5. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  6. // All Rights Reserved.
  7. //************************************************************
  8. #include <iapp.hpp>
  9. #include <ifont.hpp>
  10. #include <iframe.hpp>
  11. #include <imle.hpp>
  12.  
  13. void main()
  14. {
  15.   // Create the frame and edit area and make
  16.   // the edit area the client of the frame.
  17.   IFrameWindow aFrame( "Simple Font Example" );
  18.   IMultiLineEdit myMLE( IC_FRAME_CLIENT_ID,
  19.                         &aFrame, &aFrame );
  20.   aFrame.setClient( &myMLE );
  21.  
  22.   // Set the text of the MLE.
  23.   myMLE.setText( "abcdefgABCDEFG" );
  24.  
  25.   // Create a font object, providing a typeface name
  26.   // and point size and apply it to the frame.
  27.   IFont font( "Helvetica", 14 );
  28.   aFrame.setFont( font );
  29.  
  30.   // Show the frame and run the application.
  31.   aFrame
  32.     .setFocus()
  33.     .show();
  34.   IApplication::current().run();
  35. }
  36.  
  37.