Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!ut-ngp!jdm From: jdm@ut-ngp.UUCP (Jim Meiss) Newsgroups: comp.sys.mac Subject: ZoomWindows...Help Wanted Message-ID: <4316@ut-ngp.UUCP> Date: Mon, 17-Nov-86 21:32:03 EST Article-I.D.: ut-ngp.4316 Posted: Mon Nov 17 21:32:03 1986 Date-Received: Mon, 17-Nov-86 23:04:57 EST Reply-To: jdm@ngp.UUCP (James Meiss) Distribution: world Organization: UTexas Computation Center, Austin, Texas Lines: 88 Keywords: zoomwindow, LightSpeed C I am a novitiate both to C and to MacIntosh programing, so please pardon the question if it turns out to be trivial. I would like to implement the zoom box on a window using Lightspeed C v. 1.02 on a MacPlus. According to Tech Note #57 (the only thing I have seen written on the subject) one defines a window of type 8. This indeed gives the zoombox in the window. Next I used the enclosed code fragment to try to get the zoom. My window that zooms out okay, but will not zoom in. How come??? Perhaps my problem is in the definition of the functions TrackBox and ZoomWindow... Another question: Is it possible to set the size that the window zooms to? ------------------------------------- /* Code Fragment for Zoom Windows */ enum { inDesk, inMenuBar, inSysWindow, inContent, inDrag, inGrow, inGoAway, inZoomIn, inZoomOut }; . . pascal Boolean *TrackBox() = 0xA83B; pascal void *ZoomWindow() = 0xA83A; . . . main() { WindowPtr whichWindow; EventRecord myEvent; InitGraf(&thePort); InitFonts(); InitWindows(); InitMenus(); TEInit(); for(;;) /* forever */ { SystemTask(); if (GetNextEvent(everyEvent, &myEvent)) { switch(myEvent.what) { case mouseDown: switch (FindWindow( myEvent.where, &whichWindow )) { . . case inZoomIn: if(TrackBox(whichWindow,myEvent.where,inZoomIn)) ZoomWindow(whichWindow,inZoomOut,0); break; case inZoomOut: if(TrackBox(whichWindow,myEvent.where,inZoomOut)) ZoomWindow(whichWindow,inZoomOut,0); break; default: break; } /* end switch findwindow */ break; . . default: break; } /* end switch which event */ . . } /* end if event */ } /* end forever */ } /* end main */ -------------------------------------] Thanks for your help, Jim Meiss ut-npg!jdm