1. Screen Copy onto Window???

Hello all,

I have a problem that I could'nt find an answer for on
the listserve (prior post), so here goes.

I have a bitmap that has rounded corners and am setting
transparent the outter edges of the bitmap (easy enough)

The problem I have is when I create a Window for this
bitmap to fit ontop of, I want to capture the SCREEN
in the area of my new Window before I paint it
and set the captured Screen ontop of the new Window
before I display my bitmap...
(much like McAfee does in all their newest ware's)
essentially hideing the Window with a portion of the screen
before I drew the Window. If that makes it easier for some.

Here is an attempt (but failure) to do this.

constant
ScreenBuffer = create( Pixmap, "", 0, 50, 50, 500, 400, 0 )

procedure CopyScreenToBuffer()
  --myBitmap will start at x = 50 y = 50
  copyBlt( ScreenBuffer, 50, 50, Screen )
end procedure
CopyScreenToBuffer()

constant

procedure CopyBufferToScreen()
  copyBlt( Screen, 50, 50, ScreenBuffer )
  repaintWindow ( Win )
end procedure
onPaint[Win] = routine_id("CopyBufferToScreen")

What am I doing wrong???

Is there a better, smoother, faster way?
preferably one that works. hehe

euman at bellsouth.net

new topic     » topic index » view message » categorize

2. Re: Screen Copy onto Window???

------------9617EBA31C65C68

> Hello all,
>
> I have a problem that I could'nt find an answer for on
> the listserve (prior post), so here goes.
>
> I have a bitmap that has rounded corners and am setting
> transparent the outter edges of the bitmap (easy enough)
>
> The problem I have is when I create a Window for this
> bitmap to fit ontop of, I want to capture the SCREEN
> in the area of my new Window before I paint it
> and set the captured Screen ontop of the new Window
> before I display my bitmap...
> (much like McAfee does in all their newest ware's)
> essentially hideing the Window with a portion of the screen
> before I drew the Window. If that makes it easier for some.
>
> Here is an attempt (but failure) to do this.
>
> constant
> ScreenBuffer = create( Pixmap, "", 0, 50, 50, 500, 400, 0 )
>
> procedure CopyScreenToBuffer()
>   --myBitmap will start at x = 50 y = 50
>   copyBlt( ScreenBuffer, 50, 50, Screen )
> end procedure
> CopyScreenToBuffer()
>
> constant
> Win=create(Window,"Test",0,50,50,500,400,{WS_POPUP})
>
> procedure CopyBufferToScreen()
>   copyBlt( Screen, 50, 50, ScreenBuffer )
>   repaintWindow ( Win )
> end procedure
> onPaint[Win] = routine_id("CopyBufferToScreen")
>
> What am I doing wrong???
>
> Is there a better, smoother, faster way?
> preferably one that works. hehe
>
> euman at bellsouth.net

Hi,
Most application that have irregular shaped windows use the SetWindowRgn
API function. I've attached a library that helps do this. Hope you
find it useful :)

I hope no one minds me sending this file to the list, but it's only 10k
so it should be ok...

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.rat-software.com/
Please leave quoted text in place when replying
------------9617EBA31C65C68

new topic     » goto parent     » topic index » view message » categorize

3. Re: Screen Copy onto Window???

Thanks PatRat
 This is a perfect substitute for what I wanted.
I sure am glad this List and people like you exist.

TA
euman at bellsouth.net


----- Original Message -----
From: "Thomas Parslow (PatRat)" <patrat at RAT-SOFTWARE.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, January 14, 2001 15:23
Subject: Re: Screen Copy onto Window???


>
> Hi,
> Most application that have irregular shaped windows use the SetWindowRgn
> API function. I've attached a library that helps do this. Hope you
> find it useful :)
>
> I hope no one minds me sending this file to the list, but it's only 10k
> so it should be ok...
>
> Thomas Parslow (PatRat) ICQ #:26359483
> Rat Software
> http://www.rat-software.com/
> Please leave quoted text in place when replying

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu