Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!acorn!RMokady From: RMokady@acorn.co.uk (Ran Mokady) Newsgroups: comp.sys.acorn Subject: Re: Changing window titles Message-ID: <4866@acorn.co.uk> Date: 31 Jan 91 13:01:13 GMT References: <4860@acorn.co.uk> Sender: rmokady@acorn.co.uk Distribution: comp Organization: Acorn Computers Ltd, Cambridge, England Lines: 59 In article <4860@acorn.co.uk> pcolmer@acorn.co.uk (Philip Colmer) writes: >In article <6482@ecs.soton.ac.uk> rhh88@ecs.soton.ac.uk (Heywood RH) writes: > >>... I have tried changing the indirected pointer to the title to a new >>message and then reopening the window but it does not seem to work. > >I think you have to close the window before reopening it. This is basically >to force the window manager to realise that the window needs to be redraw. >Simply reopening the window with it already on the screen won't do it. I use >this technique and it does work. The way Philip describes works, but is not the correct way to do it as it may have some undesirable effects in future versions of Risc OS. The correct way to do it is: Change the title string. Call Wimp_GetWindowOutline , this gives you Window outline x0 (wox0) Window outline x1 (wox1) Window outline y1 (woy1) Call Wimp_GetWindowState , this gives you Work area y1 (way1) Call Wimp_ForceRedraw with: R0 = -1 ; Redraw screen area. R1 = wox0 R2 = way1 R3 = wox1 R4 = woy1 This may invalidate some other areas on the screen if your window is not at the front, but since in most cases when the title changes your window is probably at the front, this is not to bad and it is guaranteed to work correctly in the future. Ran. -------------------------------------------------------------- "We're children, Needing other children And yet letting our grown up pride Hide all the need inside Acting more like children than children"