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