[futurebasic] RE: [FB] invisible window contents

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2001 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <wedwards@...>
Date: Wed, 14 Mar 2001 00:56:18 -0500
Unfortunately, I do use getgworld and restore using setgworld.  Its been a
maddening experience.  I originaly thought I messed up the clip region of
the desktop port but no other windows are affected except the FB windows.
I'm guessing that some region is bad (or not whats expected) when the FB
window is built but its all an excercise in patience and stepwise refinement
now.

I just had a few hours of sleep so I'm going to go at it again.

Thanks, 

W.

-----Original Message-----
From: Robert Purves [mailto:robert.purves@...]
Sent: Wednesday, March 14, 2001 12:03 AM
To: futurebasic@...
Subject: Re: [FB] invisible window contents


>I have a project that captures a small portion of the screen, flashes a
>message, then restores the section of the screen.  This is all done with
>gWorlds. The messages are copybits directly the desktop port and then the
>section of the screen restored.  The problem I have is that any FB window
>that is opened after the messages are flashed are empty.
>
>The newly built windows are supposed to have edit fields, buttons and
lists.
>Ok, if that wasnt strange enough, after some poking around I figured out
>that the contents *are* there but they are invisible. If I click the mouse
>where I know a button should be, my dialog event occurs.

Could it be that the port is not restored after you finish your GWorld
stuff? The skeleton should resemble this:

dim @ windowGW as ptr, screenDevice as handle
dim myGW as ptr
dim err  as OSErr
window 1
GetGWorld( windowGW, screenDevice ) // remember port/device
err = fn NewGWorld( myGW, ... )
SetGWorld( myGW, 0 )
//... do stuff
SetGWorld( windowGW, screenDevice ) // restore port/device
// now OK to close window 1


Robert P.



--
To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>