Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!bbn!uwmcsd1!marque!gryphon!cadovax!kaz From: kaz@cadovax.UUCP (Kerry Zimmerman) Newsgroups: comp.sys.amiga Subject: Re: title bar hack Message-ID: <1909@cadovax.UUCP> Date: 26 Jan 88 20:46:16 GMT References: <8801231929.AA12560@cory.Berkeley.EDU> Reply-To: kaz@cadovax.UUCP (Kerry Zimmerman) Organization: Contel Business Systems, Torrance, CA Lines: 33 Posted: Tue Jan 26 12:46:16 1988 In article <8801231929.AA12560@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: >:SetWindowTitles() may not be the correct way to change a CLI/shell window's >:title. Why? Because this routine will point the window's Title pointer >:to someplace in the caller's process space. When the calling process >:exits, the Title pointer will be pointing at nothing useful. Next time >:the window needs refreshing, the nice title you had will probably be >:replaced by garbage characters. > > SetWindowTitles() is the ONLY way to change the title properly. >Come on people, get some brains! (That was not directed at this particular >poster). You simply save the old title pointer(s), set the new one, and then >restore the old one when you exit. > > -Matt Matt, I think you missed something. Some people would like run a utility that changes the title bar of the CLI and then exits, leaving the title bar changed. If you use SetWindowTitles() only, the utility can not exit, or it must change the title bar back (as you pointed out). Since the purpose of the utility is to change the title, it wouldn't make sense to change it back. If you are running a Shell in the CLI window, then the shell can change the title bar, and change it back when the user quits the shell. But for someone who is not running a program in the CLI window, but just wants to change the window title, using SetWindowTitles() alone is not the answer. Kerry Zimmerman # {ucbvax,decvax}!trwrb!cadovax!kaz Contel Business Systems 213-323-8170 A difference between an amateur and a professional, is that a professional has the right tools.