Re: Graphics Problems

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- Original Message ----- 
From: "Bernie Ryan" <xotron at localnet.com>
 
> euman at bellsouth.net wrote:
> > Hello all,
> > 
> > I have a program that uses graphics exclusivly for the GUI and I have 
> > one minor
>> <snip>

> Euman:
>   The -1 in RestoreDC maybe causing a problem if somewhere
>   in your program or windows the device context stack has
>   been disturbed.
> Bernie

Thanks Bernie for the reply.!

Here is a bit more info on my problem that might help you help me.

I also create a private DC,  I use CS_OWNDC.
(eg.  poke4(wndclass + style,  CS_OWNDC) )
a private device context is preserved throughout the lifetime of its associated 
window, you need to retrieve its handle only once.
the private device context is not retrieved from the GDI device-context cache.
This means that any attribute changes (in modes, colors, origins, and graphic
objects)
that you make to a private device context are preserved until you explicitly
modify them.

So I ask this: 

If I issue SaveDC( ) when my windows is deactivated and RestoreDC( ) when
my window is re-Activated how can the DC stack become corrupt in an unactive
state?

Maybe this will help???

Euman
euman at bellsouth.net
.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu