Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!acf8!deragon From: deragon@acf8.UUCP (John Paul Deragon) Newsgroups: comp.sys.mac.programmer Subject: Re: Showing a list of all the available windows Message-ID: <22780002@acf8.UUCP> Date: 24 Feb 88 05:09:00 GMT References: <8224@eleazar.Dartmouth.EDU> Organization: New York University Lines: 49 /* acf8:comp.sys.mac.programmer / icm@eleazar.Dartmouth.EDU (Ioannis C. Mangos) / 9:28 pm Feb 21, 1988 */ I am writting a small application for the Mac with some friends of mine and we want to have a menu called "Windows" that will display all the windows that there are currently on the screen. One problem I have is that there does not seem to be a command "DeleteMItem" whereas there is one called "AppendMItem" The way I was thinking to do that was to have a linked list of all the window titles and append them. But in order to do that I have to delete first all the existing titles n that menu. Does anyone has an alternative on that that is willing to share with me? Thank you for your help in advance. /* ---------- */ Excuse me if there is one before this that got thru, my editor choked.. Anyway according to my inside mac DA there is a specific function for exactly what you need. PROCEDURE DelMenuItem (theMenu: MenuHandle; item: INTEGER); DelMenuItem deletes the specified item from the given menu. Note: DelMenuItem is intended for maintaining dynamic menus (such as a list of open windows). It should not be used for disabling items; you should use DisableItem instead. Interface: Menu Manager Definitions. CONST noMark = 0; { mark symbol for MarkItem } TextMenuProc = 0; { menu defProc messages } mDrawMsg = 0; mChooseMsg = 1; mSizeMsg = 2; TYPE MenuPtr = ^MenuInfo; MenuHandle = ^MenuPtr; MenuInfo = RECORD menuId: INTEGER; menuWidth: INTEGER; menuHeight: INTEGER; menuProc: Handle; enableFlags: LongInt; menuData: STR255; END;