Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!cbmvax!carolyn From: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Newsgroups: comp.sys.amiga Subject: Re: invisible windows. Message-ID: <2448@cbmvax.UUCP> Date: Thu, 1-Oct-87 21:11:58 EDT Article-I.D.: cbmvax.2448 Posted: Thu Oct 1 21:11:58 1987 Date-Received: Tue, 6-Oct-87 00:35:48 EDT References: <828@sugar.UUCP> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Organization: Commodore Technology, West Chester, PA Lines: 47 In article <828@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >How do you open an invisible window in a screen, like the little window >in the corner of the screen uShow uses to emulate a close gadget? Do you >have to create a window and copy stuff from the screen's bitmap (I hope >not)? > >Alternatively, how can you get mouse events in a screen? > >I'm trying to display a screen without copying the bitmap over from an >internal buffer. That works... but I also want to get mouse events. I ran into similar problems with my first see-an-ilbm-in-a-screen program. You can build a viewport around an existing bitmap, you can build a screen around an existing bitmap, but you can only open a SuperBitmap window with an existing bitmap. Other windows don't have their own bitmap, and they CLEAR the screen's bitmap under themselves when they are opened. (So, if you HAD your picture in the screen, it's gone after you open the window). My solution was to break out of the ILBM loading procedure when I found the picture size information (BMHD), open an appropriate screen and BORDERLESS|BACKDROP window (with no title, no system gads), do a ShowTitle(screen,false), LoadRGB4 an all black color table, then pass the address of the screen's BitMap structure (and planes) to the loader so it could load the picture there. Then LoadRGB4() the real colors. I faked closegadget, etc. by getting MOUSEBUTTONS events and checking the msg->MouseX and msg->MouseY to see if the mouse was clicked where a closegadget normally is. BTW, You can't get input events from a screen. An alternate suggestion along the tiny window line, would be to build the screen around your BitMap, open a SCREENQUIET screen, save a small square area where the closegadget would be, open a small square BORDERLESS MOUSEBUTTONS events window there, copy the small square of bitmap data to the small window. I don't know how well this will work, just giving you something to try if you are set on building the display around existing in-memory bitplanes. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CATS >>Commodore Amiga Technical Support<< UUCP ...{allegra,ihnp4,rutgers}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=