Rendering problem in NetTerm

Andreas Mohr a.mohr at
Tue Oct 9 02:47:26 CDT 2001

On Tue, Oct 09, 2001 at 11:35:39AM +1000, Mike McCormack wrote:
> Hi All,
> i'm trying to solve a comms problem in NetTerm
> but i've run into another problem.
> The rendering in NetTerm fails almost completely. Its main window ends
> up with only the boarders drawn and will draw some toolbar buttons if
> i move the mouse over them.
> The following message appears repeatedly in the debug log:
> err:region:CombineRgn Invalid rgn=1096
> i did a bit of tracing of the app and found that the region 1096 is
> created, used by a DC, destroyed, then used again.
> Is it possible that the reference count of the region is incremented
> when it is used in some way by a DC? A similar problem to the
> reference counting one Uwe Bonnes discovered (see message to this list
> on 16 Aug)?
Yep, I strongly suspect a reference count problem here, too.
OTOH some GDI objects are NOT subject to this reference counting,
and AFAIR it might just be regions which this applies to.
I've been taking notes some months ago on the behaviour of misc. GDI objects
versus reference counting, but I don't have access to this document right now.

seem to indicate that regions do have the very same reference counting

Furthermore I've seen several people complain about invalid hrgn errors
(and no other invalid GDI object errors AFAIR !), when I come to think of it.

Also note the phrase at
"And don't forget that once you call SetWindowRgn, the region is
no longer yours and you should *not* call DeleteObject on it."
Does Wine's SetWindowRgn() act according to this behaviour ?
(this is unrelated, though, of course)

Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Tel. +49 7159 800604      

More information about the wine-devel mailing list