home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpsgpf.zip / readme.1st < prev    next >
Text File  |  1995-03-30  |  3KB  |  62 lines

  1. This is a brief introduction to my WPS sample program with Gpf. 
  2. =====================================================
  3.  
  4. This program shows how to use Gpf to create views of WPS objects and how to access 
  5. instance variables of a WPS object from a with Gpf created view. 
  6.  
  7. The sample code also demonstrates how to create and implement new WPS objects 
  8. with modified popup menues. 
  9.  
  10. The purpose and contents of some important files
  11.  
  12. SIM.DLL 
  13. is the implementation of a new WPS class SIM. The class is derived from WPAbstract. 
  14.  
  15. SIM.CSC
  16. the OIDL interface definition of SIM. This file is used as input to the SOM compiler (sc) to create the skeleton for SIM's implementation (SIM.C, SIM.H, SIM.IH.....) In SIM.C you see how to 
  17. update a popup menu and ho to respond to the opening of a view. 
  18. The view was created with Gpf, and the only think you have to do is to setup a parameter structure and call the Show<nameofwindow> function generated by Gpf. 
  19. THE TRICKY PARTHERE WAS THAT YOU MUST PASS somThis AND somSelf IN A PARAMETER
  20. STRUCTURE TO THE GPF WINDOW!!!!!!!!!!!!!!!!!
  21.  
  22. AAA.DLL 
  23. contains the view generated by Gpf. You just tell Gpf to create a DLL, design the window, write the user functions and attach them to important messages. 
  24.  
  25. UFAAA.C
  26. This file contains all user functions for the window. 
  27. HAVE A SPECIAL LOOK AT THE USER FUNCTIONS FOR INITIALIZATION AND DESTRUCTION 
  28. OF THE GPF WINDOW!!!!!!!!! These user functions must be used unchanged in your
  29. application. All other code is business as usual!
  30.  
  31. TRYSIM.C
  32. This is a small C file registering, deregistering the new WPS class and creating a new
  33. instance of the class SIM. BEFORE YOU USE THIS FUNCTION MAKE SURE, THAT THE DLLS
  34. SIM.DLL AND AAA.DLL HAVE BEEN COPIES TO A LIBPATH DIRECTORY.
  35.  
  36. TRYIT.CMD
  37. This batch file invokes TRYSIM.EXE with several parameters. 
  38.  
  39. After the execution of TRYIT you should get a SIM object with name My and an ugly 
  40. face as icon. When you double click on it you should get the Window created with Gpf. 
  41. It contains an entry field and a button (if you get first a message box telling you that 
  42. it couldn't find help, you should copy the file AAA.HLP to a  help directory.   
  43. When you press the button the number of th current icon is displayed (1, 2 or 3). This 
  44. demonstrates how to access instance data from Gpf. Please notice, that you are able to 
  45. use WPS methods from Gpf if you know the right object handle. 
  46.  
  47. Now you can change the icon. Press button 2 over the icon (or press button 1 over the 
  48. system icon of the Gpf window). The pupup menu contains the entry DEFAULT ICON. 
  49. Select the enty and select in the appearing cascaded menu Icon 1, 2 or 3. Notice the 
  50. immediate change of the system icon in the Gpf window. 
  51.  
  52. If you would like to have several instances of the Gpf window change the standard 
  53. settings. 
  54.  
  55. I hope that I structured and wrote the program clear enough to follow it. If you have questions feel free to drop me a line on CompuServe. 
  56. My ID is 72557,1153, or 
  57. start a discussion in the Gpf forum, or 
  58. send me a fax to +49 (Germany)30 (Berlin) 825 30 14  
  59.  
  60. Have fun with Gpf and WPS-Programming!
  61.  
  62. Hans J. Eisenhuth