home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / shipapp / hello1 / hello1.cpp next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  912 b   |  37 lines

  1. #include <ibase.hpp>
  2. #include <iapp.hpp>
  3. #include <istattxt.hpp>
  4. #include <iframe.hpp>
  5. #include <icoordsy.hpp>
  6. #include <istring.hpp>
  7.  
  8. #ifdef IC_PM
  9. #include <icsperf.h>    // Include prototype for PerfStop()
  10. #else
  11. #include <iperf.h>      // Include prototype for PerfStop()
  12. #endif
  13.  
  14. // Define a static object.
  15. IString appName("Hello World - Version 1");
  16.  
  17. int main()
  18. {
  19.   ICoordinateSystem::setApplicationOrientation(
  20.           ICoordinateSystem::originLowerLeft );
  21.   IFrameWindow mainWindow (appName);
  22.   IStaticText hello(IC_FRAME_CLIENT_ID, &mainWindow, &mainWindow);
  23.   hello.setText("Hello World");
  24.   hello.setAlignment(IStaticText::centerCenter);
  25.   mainWindow.setClient(&hello);
  26.  
  27.   mainWindow.sizeTo(ISize(400,300));
  28.   mainWindow.setFocus();
  29.   mainWindow.show();
  30.  
  31.   // We shut down tracing now.
  32.   PerfStop();
  33.  
  34.   IApplication::current().run();
  35.   return 0;
  36. } /* end main() */
  37.