home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PM-M2.ZIP / PMTEST.MOD < prev    next >
Text File  |  1990-08-05  |  3KB  |  60 lines

  1. (*----------------------------------------------------------------------------*)
  2. (* Example OS/2 Presentation Manager Program adapted from the book            *)
  3. (* "OS/2 Presentation Manager - Programming Primer" by Asael Dror &           *)
  4. (* Robert Lafore                                                              *)
  5. (*                                                                            *)
  6. (* Example programs converted to JPI Modula-2 Version 2 for OS/2 1.2 by       *)
  7. (* Chris Barker, August 1990                                                  *)
  8. (*                                                                            *)
  9. (* Notes:  I am distributing these programs so that others can learn and also *)
  10. (*         so I can elicit feedback from the user community on programming for*)
  11. (*         OS/2 PM using Modula-2.  If your have any questions, suggestions,  *)
  12. (*         or comments I'd love to hear from you.  I may be reached at the    *)
  13. (*         following addresses:                                               *)
  14. (*                                                                            *)
  15. (*         Compuserve ID: 72261,2312                                          *)
  16. (*         Pete Norloff's OS/2 Shareware BBS - (703) 385-4325                 *)
  17. (*         Max's Doghouse BBS - (703) 548-7849                                *)
  18. (*           The above two BBS carry the Fidonet OS/2 echo which I read       *)
  19. (*           regularly.                                                       *)
  20. (*         Programmer's Corner - (301) 596-1180                               *)
  21. (*         CPCUG Mix (Window Sig) BBS - (301) 738-9060                        *)
  22. (*                                                                            *)
  23. (*         I hope I hear from you!                                            *)
  24. (*                                                                            *)
  25. (*               - Chris                                                      *)
  26. (*                                                                            *)
  27. (*----------------------------------------------------------------------------*)
  28.  
  29. (*----------------------------------------------------------------------------*)
  30. (*  Program Notes:                                                            *)
  31. (*    My first attempt at creating an encapsulated PM window library that     *)
  32. (*    would simplify the task of creating PM windows.  This program           *)
  33. (*    demonstrates the use of JPI's OOP extensions to Modula-2.               *)
  34. (*                                                                            *)
  35. (*----------------------------------------------------------------------------*)
  36.  
  37. MODULE PMTEST;
  38.  
  39. (*# call(same_ds => off) *)
  40.  
  41. FROM OS2DEF IMPORT LSET;
  42. IMPORT Win,Pmwin;
  43.  
  44. VAR win1 : Pmwin.Stdwin;
  45.     features : LSET;
  46.     title    : ARRAY [0..40] OF CHAR;
  47.  
  48. BEGIN
  49.   features := Win.FCF_TITLEBAR      + Win.FCF_SYSMENU    +
  50.               Win.FCF_SIZEBORDER    + Win.FCF_MINMAX     +
  51.               Win.FCF_VERTSCROLL    + Win.FCF_HORZSCROLL +
  52.               Win.FCF_SHELLPOSITION + Win.FCF_TASKLIST;
  53.  
  54.   title := '- My First Window';
  55.  
  56.   win1.Init(features,title);
  57.   win1.Process;
  58.   win1.Done;
  59. END PMTEST.
  60.