home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / mac / programm / 14265 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.4 KB  |  29 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!news.uiowa.edu!news.weeg.uiowa.edu!smills
  3. From: smills@news.weeg.uiowa.edu (MuffinHead)
  4. Subject: Re: Disabling Command-Q in a program; HELP
  5. Message-ID: <1992Aug20.064750.12518@news.weeg.uiowa.edu>
  6. Keywords: Menus, File,Quit,Q 
  7. Organization: University of Iowa, Iowa City, IA, USA
  8. References: <1992Aug19.204614.11139@u.washington.edu>
  9. Distribution: usa
  10. Date: Thu, 20 Aug 1992 06:47:50 GMT
  11. Lines: 16
  12.  
  13. aph@milton.u.washington.edu (Al Hallstrom) writes:
  14.  
  15. >I am using THINK C 5.0 on a Mac IIsi.
  16. >I am writing a program and I want to disable the user from being able to
  17. >press Command-Q to quit. Yes I know this is not a good idea, but you will
  18. >just have to trust me.  I have been able to get is that if you pull down the 
  19. >menu and select Quit nothing happens, but that is not what I want.  I have
  20. >looked through ANSI and changed the InitConsole section where menus are 
  21. >created. I have played with ResEdit and adding menus that way.  Even if I 
  22. >can get rid of the menus Quit (along with the Edit commands) still have
  23. >their command key equivalents.  Does anyone know of any way to diasble 
  24. >the command key equivalents?  It would be a great help.
  25.  
  26.    First of all, menues should only respond to Command keys if it is in
  27. the menu resource. If a program is written so it does otherwise, it's in
  28. error. If you don't want the user to be able to quit, call DisableItem on
  29.