Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!COGSCI.BERKELEY.EDU!bryce From: bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) Newsgroups: comp.sys.amiga Subject: custom screen trick Message-ID: <8707230157.AA12404@cogsci.berkeley.edu> Date: Wed, 22-Jul-87 21:57:49 EDT Article-I.D.: cogsci.8707230157.AA12404 Posted: Wed Jul 22 21:57:49 1987 Date-Received: Sat, 25-Jul-87 01:55:58 EDT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 32 Here's a little trick I ran across that you might find useful: Recently I needed a screen with the standard drag bar, depth gadgets *AND* a close box. A close box is not one of the standard things you can add to a screen. About six characters into a custom gadget definition I realized that there was a quicker, dirtier, easier way; this is it: struct NewWindow MyGadgetW = { 0, 0, 15, 10, /* LO-RES */ -1, -1, CLOSEWINDOW, WINDOWCLOSE|SIMPLE_REFRESH|NOCAREREFRESH, NULL, NULL, NULL, NULL, /* Screen pointer filled in later */ NULL, 0, 0, 0, 0, CUSTOMSCREEN }; This can be used to open a SIMPLE_REFRESH window that's the size of a close gadget. Since all it contains is a close gadget that's all it will be. (For some fun add a one pixel drag bar... :-) |\ /| . Ack! (NAK, EOT, SOH) {o O} . ( " ) bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce U "Success leads to stagnation; stagnation leads to failure."