home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PM-M2B.ZIP / PMTEST.MOD < prev    next >
Text File  |  1990-10-04  |  3KB  |  61 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, October 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. (*# call(same_ds => off) *)
  38. (*# data(heap_size=> 3000) *)
  39.  
  40. MODULE PMTEST;
  41.  
  42. FROM OS2DEF IMPORT LSET;
  43. IMPORT Win,Pmwin;
  44.  
  45. VAR win1 : Pmwin.Stdwin;
  46.     features : LSET;
  47.     title    : ARRAY [0..40] OF CHAR;
  48.  
  49. BEGIN
  50.   features := Win.FCF_TITLEBAR      + Win.FCF_SYSMENU    +
  51.               Win.FCF_SIZEBORDER    + Win.FCF_MINMAX     +
  52.               Win.FCF_VERTSCROLL    + Win.FCF_HORZSCROLL +
  53.               Win.FCF_SHELLPOSITION + Win.FCF_TASKLIST;
  54.  
  55.   title := '- My First OOP Window';
  56.  
  57.   win1.Init(features,title);
  58.   win1.Process;
  59.   win1.Done;
  60. END PMTEST.
  61.