jdm@ut-ngp.UUCP (Jim Meiss) (11/18/86)
References: I am a novitiate both to C and to MacIntosh programing, so please pardon the question if it turns out to be trivail. I would like to implement the zoom box on a window using Lightspeed C v. 1.05, MacPlus, etc. According to Tech Note #57 (the only thing I have seen written on the subject) one uses a window of type 8, and as far as I can tell, the following code fragment. This gets me a 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: Can I set the size the window zooms to...say I don't want it to be full screen? ------------------------------------- /* 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