home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / os2 / programm / 7176 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!col.hp.com!news.dtc.hp.com!hpscit.sc.hp.com!kitchin
  2. From: kitchin@lf.hp.com (Bruce Kitchin)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: How to link programs which do not switch to full screen ?
  5. Date: 22 Dec 1992 21:21:43 GMT
  6. Organization: Hewlett Packard Santa Clara Site
  7. Lines: 32
  8. Message-ID: <1h80t7INN2mm@hpscit.sc.hp.com>
  9. References: <1992Dec22.193053.12880@cs.tu-berlin.de>
  10. NNTP-Posting-Host: eden.avo.hp.com
  11. X-Newsreader: TIN [version 1.1.2 PL7]
  12.  
  13. Ernst Kloecker (ernst@opal.cs.tu-berlin.de) wrote:
  14. : I am using Microsoft C 6.00 on OS/2 1.32. Whenever I link a text mode OS/2
  15. : program, it switches to full screen after being started. I assume I am linking
  16. : with the wrong libraries.
  17. : Which library do I have to link to make my program run in an ordinary OS/2
  18. : window ?
  19. The problem is not the libraries but the way you are linking.  There are
  20. three approaches to solve this problem.  There is a utility that I got
  21. with MSC 6.0 (since I don't have MSC on my system now, I can't be sure
  22. the name).  With OS/2 2.0 the utility is called MarkExe and when run
  23. with no arguments gives you some help.  By default the program is linked
  24. as NOTSPECIFIED.  When you start such a program in a window, it flips to
  25. full screen for the duration of that program.  If you use markexe to
  26. change it to WINDOWCOMPAT it will run either full screen or windowed
  27. depending on which mode you were in when you started it.
  28.  
  29. However, you can link the program to avoid this.  One way is to
  30. put the option /PMTYPE:VIO in the link (same place you would put /CO
  31. or /MAP).  This is the simplest.  If you use a def file you can put 
  32. the word WINDOWCOMPAT in the name statement after the program's name.
  33.  
  34. As to why they do this, I'm not sure.  I suppose that since some programs
  35. do non-standard stuff such as take over complete control of the video
  36. to do graphics, they figured that it was safer to not window a program
  37. unless it says it is ok.  This goes back to OS/2 1.1 and is really a
  38. Microsoft artifact.
  39.  
  40. Good luck.
  41.  
  42.