[comp.sys.amiga.tech] how to display second bitmap?

crash@jc3b21.UUCP (Frank J. Edwards) (02/06/89)

I'm stuck!  I've used OpenWindow() to create a new window, and I've
created a raster port with InitRastPort() including the bit planes
I'm going to be using (depth = 2).

Now how do I get the current window to switch from it's current
RasterPort to the one I've built?  I stored the address of my structure
into Window->RPort, but that didn't do it.  Is there something else I
need to do?  I saw in the ROM Kernel Ref: LIB & DEV that there is also
a RasInfo structure; do I need to do anything with that?

The whole reason I'm interested in all of this is because the default
window (the one I opened) has a title bar and I don't want one, but I
do want the WINDOWCLOSE and WINDOWDEPTH gadgets.  So I figured I'd
supply a new BitMap/RastPort with the image I wanted to display and
that'd be it.

Essentially, this is what I'm doing:

	Window = OpenWindow(&newwin);

	InitRastPort(&myrp);
	InitBitMap(&mybmap, DEPTH, WIDTH, HEIGHT);
	...  allocate bit planes  ...
	myrp.BitMap = &mybmap;

	SetAPen(&myrp, 0);
	SetBPen(&myrp, 1);
	...  do all of my drawing, etc  ...
	Window->RPort = &myrp;

... shouldn't my new bitmap be displayed now?

If you can help, thanks!!  Mail would be more reliable since my site
usually cleans the spool directories daily and I might miss the answer!

Frank "Crash" Edwards
...!uunet!pdn!boake2!jc3b21!crash

You gotta' know when to code'em, know when to modem.
Know when to load'em up, know when to run.
You never count you're money while you're sitting at the keyboard,
They'll be time enought for counting when the contract's done.
		-- Anonymous

ksp@anuck.UUCP (p.s.kasten) (02/07/89)

In article <564@jc3b21.UUCP>, crash@jc3b21.UUCP (Frank J. Edwards) writes:
> 
> The whole reason I'm interested in all of this is because the default
> window (the one I opened) has a title bar and I don't want one, but I
> do want the WINDOWCLOSE and WINDOWDEPTH gadgets.  So I figured I'd
> supply a new BitMap/RastPort with the image I wanted to display and
> that'd be it.
> 

This isn't an answer, but, instead a related question.  Sometimes it
is desirable to have system gadgets (like CloseWindow or DepthArranging)
used in new and exciting ways, but rendered exactly the same way as if
the were used standardly (as Frank wants here; i.e., a CloseWindow gadget
without the title bar).  Another desirable is to SetPointer() to the
Intuition Sleepy Z's pointer.  Is it possible to have a supported library
function written to return a pointer to a specified system Image or Gadget?

phil kasten
AT&T Bell Labs
!att!mvuxj!ksp