Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!garnet.berkeley.edu!bmyers From: bmyers@garnet.berkeley.edu (Brian Myers) Newsgroups: comp.sys.mac.programmer Subject: Can I modify the Text Window title in THINK Pascal? Message-ID: <1990Oct9.062443.18141@agate.berkeley.edu> Date: 9 Oct 90 06:24:43 GMT Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California, Berkeley Lines: 26 The following simple program does not work (in THINK's Lightspeed Pascal): program ChangeTitle; var wPtr: WindowPtr; theTitle: Str255; begin ShowText; {makes TextWindow visible, active} wPtr:=FrontWindow; {should give handle to Text Window} GetWTitle(wPtr, theTitle); {should retrieve title string} WriteLn(theTitle); {should display title string} end. What actually happens is a string of garbage appears as output from that last WriteLn. SetWTitle also has no effect--this program was what I tried when I couldn't make SetWTitle work. I now suspect that THINK Pascal somehow protects its standard windows (Text, Drawing, etc) from your own programs as they run. Might the compiler somehow remove these windows, even though they exist on the screen, from the system queue? Is that even possible? Or why else am I getting garbage? Thanks for any help. --------------------------------------------------------------------------- Brian Myers bmyers@garnet.berkeley.edu