Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: The Eternal Question Message-ID: <32965@ucbvax.BERKELEY.EDU> Date: 3 Dec 89 04:26:07 GMT References: <11881@phoenix.Princeton.EDU> <36956@apple.Apple.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 30 In article <36956@apple.Apple.COM> stadler@Apple.COM (Andy Stadler) writes: >yourself with a scroll bar to determine which line to start with. ------ --- And don't forget that scrollbars themselves can only handle a range of 0-32767 since they use signed 16-bit ints. I use the following structure to provide a wrapper around scrollbars to give them a 32-bit range: /* ExtendedControl - 32 bit analog to scroll bars. */ typedef struct ExtendedControl{ ControlHandle ch; LongInt max, min, value; Integer shiftFactor; }ExtendedControl, *ExtendedControlPtr, **ExtendedControlHandle; I use the shiftFactor to stuff the high order non-zero 15 bits of max, min and value into the appropriate ControlHandle fields, and wrote my own set of calls that mimic the control manager calls but use LongInts throughout. CAPPS' from Symantec will handle text longer than 32k, but it is only available in source code form at the moment, and the last price they quoted me was $5000.00. Their examples all use standard scrollbars, so they suffer from the 32k line problem as I outlined above. Your milage may differ. > The mac is a detour in the inevitable march of mediocre computers. > drs@bnlux0.bnl.gov (David R. Stampf) --- David Phillip Oster -master of the ad hoc odd hack. Arpa: oster@dewey.soe.berkeley.edu Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu