home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / read.me
Text File  |  1996-10-31  |  22KB  |  377 lines

  1. Thank you for purchasing our newest edition of Power GUI Programming.  We
  2. hope you find the book and its accompanying disk useful.  The disk
  3. contains example programs, a trial copy of VisualAge for C++ for Windows,
  4. and an extra chapter that does not appear in the text of the book.
  5.  
  6.  
  7. REPORTING PROBLEMS
  8. ------------------
  9. In the last edition, we asked you to contact us directly with any problems
  10. that you found in the book or with the examples.  For a number of reasons
  11. (some of us taking new jobs and changing Internet addresses), we'd like
  12. you to report problems in one of the normal support forums provided for
  13. VisualAge for C++.  Start your append with something like, "Could you
  14. please forward the following remarks to one of the Power GUI authors."
  15. For a list of the support forums, see the VisualAge for C++ publication
  16. "Support and How to Get It" provided with the product.
  17.  
  18. In the last addition of the book we inserted a large number of spurious
  19. commas just to see if you were on your toes.  Many of you were and
  20. politely pointed it out to us.  In keeping with this tradition, this time
  21. we've decided to forgo the use of the common names Windows and OS/2 for
  22. the more correct and verbose names "the Windows operating system" and
  23. "the OS/2 operating system."   Please don't fill up the forums with
  24. comments on this.
  25.  
  26.  
  27. THE EXAMPLE PROGRAMS
  28. --------------------
  29. The disk contains 150 example programs that appear in or are referenced
  30. from the book.  We'd like to tell you that we have extensively tested the
  31. examples and certified them ready for you to use without any work on your
  32. part, but we won't.  We will tell you that, despite what the copyright on
  33. this disk seems to imply, we've built these examples to help you write the
  34. code for your product.  You can freely use parts or all of these examples
  35. as long as you don't sell the classes as your own.
  36.  
  37. Installing the Examples
  38. -----------------------
  39. There is nothing fancy about the installation or use of these examples.
  40. As the instructions below describe, you can run the examples directly from
  41. the CD-ROM or copy them to your hard disk (this step is required if you
  42. want to rebuild the examples).  To copy the examples from the CD-ROM drive
  43. on m: to your hard disk on d:, use the following command:
  44.   xcopy m:\powergui\*.* d:\powergui\*.* /s
  45.  
  46. Running the Examples
  47. --------------------
  48. The examples are on the CD-ROM in the "powergui" directory.  Each example
  49. is in its own directory underneath a directory for the chapter that
  50. describes the use of the example.  The executable code for each example is
  51. in yet another directory under the example directory.  Executable code for
  52. the Windows platforms is in a "win" directory and executable code for the
  53. OS/2 platform is in an "os2" directory.  Typically, the executable program
  54. is named the same as the directory holding the source code for the
  55. example.
  56.  
  57. For example, in Chapter 1, "Getting Started," we've introduced a program
  58. called "Simple Example - Version 1."
  59.   1) The code for this program is on the CD-ROM in the directory:
  60.      \powergui\getstart\start1.
  61.   2) To run the OS/2 version of this program, execute the following
  62.      commands:
  63.      cd \powergui\getstart\start1\os2
  64.      start1
  65.   3) Likewise, to run the Windows version of this program, execute the
  66.      following commands:
  67.      cd \powergui\getstart\start1\win
  68.      start1
  69.  
  70. Some of the examples have dependencies on other files (help and text
  71. files) that require you to run them with the directory containing the
  72. executable file as the current directory.
  73.  
  74. The table near the bottom of this readme identifies the location of each
  75. example.
  76.  
  77. All of the example programs have been built by dynamically linking to both
  78. the C/C++ runtime and the Open Class Library DLLs.  Therefore, to run
  79. these programs, you must have installed the appropriate VisualAge for C++
  80. product so that the C/C++ runtime and Open Class Library DLLs exist on
  81. your system and are found via the LIBPATH (OS/2) or PATH (Windows)
  82. environment variables.  These products are VisualAge C++ for OS/2, Version
  83. 3.0, and VisualAge for C++ for Windows, Version 3.5 (the CD-ROM includes a
  84. trial version of the latter).  Some examples use features added to Open
  85. Class Library in VisualAge for C++ for Windows that are not found in the
  86. OS/2 product as shipped (we hope that these features make it into a FixPak
  87. for VisualAge for C++ for OS/2, however).
  88.  
  89. For some of the examples to run properly, you must apply the latest FixPak
  90. for Open Class Library.  You can find information for obtaining FixPaks on
  91. the VisualAge for C++ home page on the World Wide Web:
  92.   www.software.ibm.com/ad/visualage_c++
  93.  
  94. You can also use a program that we've supplied on the CD-ROM to run many
  95. of the examples.  This program is further described below.  To run the
  96. program on the examples directly from the CD-ROM, execute the following
  97. commands:
  98.   m:
  99.   cd \powergui
  100.   powergui
  101.  
  102. Building the Examples
  103. ---------------------
  104. To rebuild the examples, you must copy them to your hard drive.  The
  105. following examples assume that you have copied them to the "powergui"
  106. directory of your d: drive as we have described above.
  107.  
  108. Each example contains a file, named "makefile," that you use to rebuild
  109. the program.  You can build any example by making the directory containing
  110. the example the current directory and executing the command "nmake."  Each
  111. makefile is constructed to work in both the OS/2 and Windows operating
  112. systems.  However, in the OS/2 operating system you are required to add
  113. the definition of IC_PM to the environment.  The easiest way to do this is
  114. by adding the following line to the bottom of your config.sys file and
  115. rebooting your machine:
  116.    set IC_PM=1
  117.  
  118. You can add the nmake option "/a" to force the examples to rebuild
  119. regardless of the dependency rules contained in makefile.  For example, to
  120. force the rebuild of the first "Getting Started" example, issue the
  121. following commands.
  122.    d:
  123.    cd \powergui\getstart\start1
  124.    nmake /a
  125.  
  126. As supplied, the make files do not build the examples with debugging
  127. information.  If you need to debug the examples, simply add "/Ti+" to the
  128. VisualAge for C++ compiler options environment variable, icc, and then run
  129. nmake.  The following commands can rebuild the first "Getting Started"
  130. example with debugging information:
  131.    set icc=/Ti+
  132.    d:
  133.    cd \powergui\getstart\start1
  134.    nmake /a
  135.  
  136. The PowerGUI Program
  137. --------------------
  138. In the root example directory (e.g. d:\powergui above), we have included a
  139. simple program (actually a batch file to run the program) that we used to
  140. build and test the examples.  We've included this program on the disk to
  141. give you better visibility to the examples.  To start the program, change
  142. to the root examples directory and enter "powergui."
  143.   d:
  144.   cd \powergui
  145.   powergui
  146.  
  147. When loaded, the program displays a tree-view container in the top half of
  148. a split canvas.  The bottom of the split canvas is a status window that
  149. displays the results of your requests.
  150.  
  151. The program allows you to build and run the example programs one at a
  152. time, by chapter, or all at once.  To run a single program, double-click
  153. the program name.  To run all of the examples in a chapter, double-click
  154. the chapter name.  Use the menu bar to access other build options.
  155.  
  156. To build a single program, select the program name and choose the
  157. "Examples/Build Selected" menu item.  Similarly, to build all the programs
  158. in a chapter, select the chapter name and again choose the
  159. "Examples/Build Selected" menu item.
  160.  
  161. Because the program uses a work queue to process requests to build and run
  162. programs, you can only build or run a single program at a time.  You can
  163. add additional requests but they are queued until either the prior build
  164. finishes or you terminate the currently running example program.
  165.  
  166. Because of differences between the OS/2 and Windows operating systems in
  167. executing child command processes and redirecting output, the programs
  168. build and run differently on these two platforms.  On the OS/2 platform,
  169. builds and non-UI programs are executed in a background process and the
  170. results are displayed in the status portion of the split canvas.  On the
  171. Windows platform, builds and non-UI programs are executed in a foreground
  172. process.  When you run non-UI programs on the Windows operating system,
  173. the DOS window associated with the program remains open.  You must close
  174. this window before the powergui program can run other programs.
  175.  
  176. If you want to use the powergui program to build the examples with
  177. debugging information, you must set the compiler environment variable
  178. prior to starting the powergui program.  If you always want to build the
  179. examples with debugging information, you can edit the batch files used to
  180. start powergui and add the SET ICC=/Ti+ command prior to the invocation of
  181. powergui.
  182.  
  183. The output of builds from within powergui is redirected to a log file
  184. (buildlog.os2 on the OS/2 operating system and buildlog.win on the Windows
  185. operating system).  You can replace the status window with the contents of
  186. this file by choosing the "Examples/Display Error Log" menu item.
  187.  
  188. Table of Example Programs
  189. -------------------------
  190. The following lists the examples contained on the CD-ROM.
  191.  
  192.  #  Chapter Directory              EXE           Example Name
  193. --- ------- -----------------      --------      -----------------------------
  194.   1    1    getstart\start1        start1        Simple Example - Version 1
  195.   2    1    getstart\start2        start2        Simple Example - Version 2
  196.   3    1    getstart\nonport       nonport       Using Platform-Specific Code
  197.   4    3    latour\shopping        shopping      Shopping List
  198.   5    5    frame1\dialog          dialog        Frame Window From Dialog Template
  199.   6    5    frame1\modal           modal         Modal Frame Window
  200.   7    5    frame1\minmax          minmax        Minimize/Maximize Handler
  201.   8    5    frame1\ok2close        ok2close      Confirm Frame Window Closing
  202.   9    5    frame1\frmextns        frmextns      Frame Extension Sampler
  203.  10    5    frame1\dismiss         dismiss       Dismissing a Window
  204.  11    5    frame1\infoarea        infoarea      Information Area for the System Menu
  205.  12    5    frame1\titlebar        titlebar      Accessing the Title Bar
  206.  13    6    menus\accel            accel         Accelerator Table Loading
  207.  14    6    menus\addsubmn         addsubmn      Loading a Resource Submenus
  208.  15    6    menus\cursor           cursor        Using a Menu Cursor
  209.  16    6    menus\drawmenu         drawmenu      Drawing Menu Items
  210.  17    6    menus\dynaccel         dynaccel      Dynamic Accelerators
  211.  18    6    menus\dynpopup         dynpopup      Dynamically-Created Pop Up Menus
  212.  19    6    menus\dynsubmn         dynsubmn      Dynamic Submenus
  213.  20    6    menus\menubar          menubar       Using an IMenuBar
  214.  21    6    menus\menures          menures       Defining a Menu Resource
  215.  22    6    menus\sysmenu          sysmenu       Accessing the System Menu
  216.  23    6    menus\titlebmp         titlebmp      Title Bar Bitmaps
  217.  24    6    menus\txtpopup         txtpopup      Pop Up Menu Sample
  218.  25    7    controls\ctors         ctors         Control Constructor and Color
  219.  26    8    static\boxes           boxes         Group Box and Outline Box
  220.  27    8    static\iconbmp         iconbmp       Icons and Bitmaps
  221.  28    8    static\textclr         textclr       Static Text Colors
  222.  29    8    static\textcv          textcv        Static Text and Canvases
  223.  30    8    static\textstyl        textstyl      Static Text Styles
  224.  31    9    editctls\logon         logon         Using an Edit Handler
  225.  32    9    editctls\simple        simple        Simple Edit Control
  226.  33   10    buttons\pushbut        pushbut       Push Buttons
  227.  34   10    buttons\titlebut       titlebut      Title Bar Bitmaps
  228.  35   10    buttons\radio          radio         Radio Button Select Handler
  229.  36   11    listctls\drawlist      drawlist      List Box Custom Drawing
  230.  37   11    listctls\spinbut       spinbut       Spin Button Date Control
  231.  38   12    slider\progind         progind       Progress Indicator
  232.  39   12    slider\slider          slider        Linear Slider
  233.  40   12    slider\cslider         cslider       Circular Slider
  234.  41   12    slider\sliddraw        sliddraw      Progress Indicator Custom Painting
  235.  42   12    slider\slidsync        slidsync      Synchronized Slider Controls
  236.  43   13    cnr\treetxtv           treetxtv      Container Tree Text View
  237.  44   13    cnr\treeicov           treeicov      Container Tree Icon View
  238.  45   13    cnr\treenamv           treenamv      Container Tree Name View
  239.  46   13    cnr\textview           textview      Container Text View with Multiple Lines
  240.  47   13    cnr\cdate              cdate         Dates and Times using CDATE/CTIME
  241.  48   13    cnr\uidate             uidate        Dates and Times using IDate/ITime
  242.  49   13    cnr\help               help          Using Help in the Container
  243.  50   13    cnr\edithdr            edithdr       Container MLE Edit Handler
  244.  51   13    cnr\popup              popup         Container Popup Menus
  245.  52   13    cnr\dynobj             dynobj        Dynamic Creation of Objects
  246.  53   13    cnr\minicnr            minicnr       Using Mini-Icons in the Container
  247.  54   13    cnr\spreadsh           spreadsh      SpreadSheet Behavior in the Details View
  248.  55   13    cnr\treedet            treedet       Combining the Tree and Details View
  249.  56   13    cnr\cnralloc           cnralloc      Using ICnrAllocator
  250.  57   14    notebook\simple        simple        Simple Client Notebook
  251.  58   14    notebook\default       default       Default Notebook
  252.  59   14    notebook\addpages      addpages      Adding Notebook Pages
  253.  60   14    notebook\vportdlg      vportdlg      Using a View Port as a Notebook Page
  254.  61   14    notebook\select        select        Delayed Addition of Pages
  255.  62   14    notebook\smrtguid      smrtguid      Smart Guide Notebook
  256.  63   15    canvas\lunchdlg        lunchdlg      Lunch Dialog Box
  257.  64   15    canvas\cvsimple        cvsimple      Simple ICanvas
  258.  65   15    canvas\cvtab           cvtab         Nested Canvas Tabbing
  259.  66   15    canvas\setlunch        setlunch      Lunch Dialog using a Set Canvas
  260.  67   15    canvas\setdecks        setdecks      Decks in a Set Canvas
  261.  68   15    canvas\setpack         setpack       Deck Packing and Alignment in a Set Canvas
  262.  69   15    canvas\mcsimple        mcsimple      Simple Multicell Canvas
  263.  70   15    canvas\mclunch         mclunch       Lunch Dialog using a Multicell Canvas
  264.  71   15    canvas\mcbad           mcbad         Multicell Canvas without Expandable Rows/Columns
  265.  72   15    canvas\mccombo         mccombo       Multicell Canvas with Combination Boxes
  266.  73   15    canvas\mcgroup         mcgroup       Multicell Canvas with Smarter Group Boxes
  267.  74   15    canvas\splittxt        splittxt      Simple Split Canvas
  268.  75   15    canvas\splitprb        splitprb      Split Canvas with Problem Windows
  269.  76   15    canvas\vportbmp        vportbmp      View Port for Scrolling a Bitmap
  270.  77   15    canvas\vportlog        vportlog      View Port with Logically-Sized Window
  271.  78   15    canvas\complex         complex       Complex Canvas Example
  272.  79   16    toolbar\animated       animated      Animated Buttons
  273.  80   16    toolbar\cbutsimp       cbutsimp      Simple Custom Buttons
  274.  81   16    toolbar\cbuthdr        cbuthdr       Custom Button Handler
  275.  82   16    toolbar\flybasic       flybasic      Simple Fly-over Help
  276.  83   16    toolbar\flytbar        flytbar       Tool Bar Fly-over Help
  277.  84   16    toolbar\tbardeck       tbardeck      Using Decks in Tool Bars
  278.  85   16    toolbar\tbarfrms       tbarfrms      Floating Tool Bars
  279.  86   16    toolbar\tbargrps       tbargrps      Using Groups in Tool Bars
  280.  87   16    toolbar\tbarlocs       tbarlocs      Tool Bar Locations
  281.  88   16    toolbar\tbarmult       tbarmult      Multiple Tool Bars
  282.  89   17    genhdrs\cmdhdrs        cmdhdrs       Simple Command Handler
  283.  90   17    genhdrs\keybd          keybd         Keyboard Handler
  284.  91   17    genhdrs\mouseclk       mouseclk      Mouse Click Handler
  285.  92   17    genhdrs\enablcls       enablcls      Disable Close
  286.  93   17    genhdrs\mousemov       mousemov      Processing Mouse Pointer Movement
  287.  94   17    genhdrs\painthdr       painthdr      Paint Handler
  288.  95   18    fonts\simple           simple        Simple Font Example
  289.  96   18    fonts\genfont          genfont       Common Font Functions
  290.  97   18    fonts\advfont          advfont       Using Advanced Font Functions
  291.  98   18    fonts\filedlg          filedlg       Using the File Dialog
  292.  99   18    fonts\fontdlg          fontdlg       Using the Font Dialog
  293. 100   19    advframe\fstyle        fstyle        Frame Window Styles
  294. 101   19    advframe\drawextn      drawextn      Derived Frame Extensions
  295. 102   19    advframe\framesav      framesav      Frame Window Position Save Handler
  296. 103   19    advframe\tstdlg        tstdlg        Dialog Windows
  297. 104   19    advframe\winview       winview       Window Viewer Example
  298. 105   19    advframe\mdi           mdi           MDI Example
  299. 106   20    thread\simple          simple        Simple Multi-threaded Example
  300. 107   20    thread\exit            threadex      Thread Termination
  301. 108   20    thread\improved        broken        Broken Thread Example
  302. 109   20    thread\improved        fixed         Fixed Thread Example
  303. 110   20    thread\improved        easy          Simplified IThreadMemberFn
  304. 111   20    thread\picalc          picalc        Pi Calculator
  305. 112   20    thread\pithread        pithread      Calculate Pi on a Thread
  306. 113   20    thread\piserve         piserve       Service Thread
  307. 114   20    thread\starting        starting      Starting Threads Using IThread
  308. 115   20    thread\threads         threads       Ultimate IThread Demo program
  309. 116   21    dm\menudrag            menudrag      Menu Drag Example
  310. 117   21    dm\spindrag            spindrag      Spin Button Drag Example
  311. 118   21    dm\lboxdrag            lboxdrag      List Box Drag Example
  312. 119   21    dm\dragview            dragview      Drag Information Viewer
  313. 120   23    help\helpmenu          helpmenu      Help Menu Choices
  314. 121   23    help\helpid            helpid        Runtime Setting of Help Panels
  315. 122   23    help\helptbl           helptbl       Help Tables
  316. 123   23    help\helpothr          helpothr      Help for Special Cases
  317. 124   24    reslib\exetext         exetext       Using Resources in the EXE
  318. 125   24    reslib\dlltext         dlltext       Building a Resource DLL
  319. 126   24    reslib\stattxt         stattxt       Switching Resources Dynamically
  320. 127   24    reslib\procaddr        NONE          Using IProcedureAddress
  321. 128   25    profile\basicpro       basicpro      Basic Profile Example
  322. 129   25    profile\advprof        profile       GUI Profile Viewer
  323. 130   25    profile\viewprof       viewprof      Non-GUI Profile Viewer
  324. 131   26    data\cipher            cipher        Using an IString as a Buffer
  325. 132   26    data\igrep             igrep         Using IString::isLike
  326. 133   26    data\strngtst          strngtst      Using IStringTest
  327. 134   26    data\convert           convert       Using IString Conversion Functions
  328. 135   26    data\mybuffer          mybuffer      Replacing IBuffer With Your Own Class
  329. 136   26    data\str2date          str2date      Creating Dates and Times from Strings
  330. 137   26    data\stparse           stparse       String Parsing
  331. 138   27    exceptns\newexcp       newexcp       Deriving a New Exception Class
  332. 139   27    exceptns\exviewer      exviewer      An Exception Viewer
  333. 140   28    debug\trace            trace         Simple Trace Example
  334. 141   28    debug\tracebox         tracebox      Trace Browser Utility
  335. 142   28    debug\prtque           prtque        Trace Queue Browser Example
  336. 143   28    debug\zeroptr          zeroptr       Debugging a Zero Pointer
  337. 144   28    debug\excdisp          excdisp       Displaying an Exception in a Message Box
  338. 145   28    debug\invisibl         invisibl      Finding Why a Window is not Visible
  339. 146   28    debug\sigterm          sigterm       Building a Termination Signal Handler
  340. 147   29    shipapp\hello1         hello1        Changes to Hello1 for Start-Up Tuning
  341. 148   29    shipapp\appstat        appstat       Using Static Object Functions instead of Static Objects
  342. 149   29    shipapp\genprags       NONE          Command File to Generate alloc_text for Static Functions
  343. 150  n/a    extlib\valueset        testvset      Value Set Test Program
  344.  
  345.  
  346. THE TRIAL COPY OF VISUALAGE FOR C++ FOR WINDOWS, VERSION 3.5
  347. ------------------------------------------------------------
  348. The IBM Corporation was kind enough to allow us to include a trial version
  349. of VisualAge for C++ for the Windows operating system with our book.  You
  350. can use this trial copy for 60 days after you install it.
  351.  
  352. The trial copy is located in the "trialva" directory.  It also contains
  353. readme.txt, license.agr, and setup.exe.  See readme.txt for installation
  354. information and license.agr for licensing information.  To install the
  355. trial copy from the CD-ROM drive on m:, run setup.exe while running on
  356. either the WIndows 95 or Windows NT operating system:  
  357.   m:
  358.   cd \trialva
  359.   setup
  360.  
  361.  
  362. THE EXTRA CHAPTER
  363. -----------------
  364. Due to space and time constraints, we include an extra chapter as a
  365. PostScript file rather than as part of the text of the book itself.  This
  366. chapter, "Custom Controls and Handlers," describes how you can create your
  367. own window, event, and event handler classes to extend Open Class Library.
  368. This chapter is essentially unchanged from how it appeared in the
  369. preceding version of this book, so its dicussion and example program are
  370. in the context of using the version of Open Class Library shipped with
  371. C Set ++ for OS/2 (the predecesor product to VisualAge for C++).
  372. However, the concepts that the chapter presents are still applicable to
  373. VisualAge for C++.
  374.  
  375. The PostScript file, extlib.ps, is in the "powergui" directory.
  376.  
  377.