home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / VERSION / VERSION.CPP < prev    next >
Text File  |  1995-04-07  |  1KB  |  29 lines

  1. #ifndef _IBASE_                         //Make sure ibase.hpp is included
  2.   #include <ibase.hpp>                  //  since that is where IC_<environ>
  3. #endif                                  //  is defined.
  4. #include <iapp.hpp>                     //IApplication class
  5. #include <ititle.hpp>                   //ITitle class
  6. #include <istring.hpp>                  //IString class
  7. #include <istattxt.hpp>                 //IStaticText class
  8. #include <iframe.hpp>                   //IFrameWindow class
  9.  
  10. int main()
  11. {
  12.   IFrameWindow mainWindow (0x1000);
  13.  
  14.   ITitle mainTitle(&mainWindow);
  15.   mainTitle.setTitleText("Version Sample");
  16.  
  17.   IStaticText version(0x8008, &mainWindow, &mainWindow);
  18.   version.setText("Major="+IString(IC_MAJOR_VERSION)+"    "+
  19.                 "minor="+IString(IC_MINOR_VERSION));
  20.   version.setAlignment(IStaticText::centerCenter);
  21.   mainWindow.setClient(&version);
  22.  
  23.   mainWindow.sizeTo(ISize(800,100));
  24.   mainWindow.setFocus();
  25.   mainWindow.show();
  26.   IApplication::current().run();
  27.   return 0;
  28. } /* end main */
  29.