[lazarus] ExcludeClipRect function

Peter Dyson peter at skel.demon.co.uk
Tue Mar 14 11:51:37 EST 2000

----- Original Message -----
From: Shane Miller <SMiller1 at stvgb.org>
To: <lazarus at miraclec.com>
Sent: Tuesday, March 14, 2000 3:07 PM
Subject: [lazarus] ExcludeClipRect function

> Anyone have an idea on how this works?  Your supposed to send it the hdc,
left, right,top, bottom and it'll exclude this rect from the structure that
is going to be painted.  The problem is that I don't know where to look for
that structure.  I thought it was help in the DC but I don't see it in our
> Understand what I mean?  If I send you a rect to exclude you need the
original rect in order to change it to exclude the one I sent you.  WHere is
the original?
> Shane

Well it will probably be a while before any of this gets implemented.
Basically it stops windows from attempting to render the parent region
for that rect. This is part of the window rendering optimization. As I
am still building the support for rect window painting optimizations
these have to be fully working before regions can be even attempted.
Most of this stuff relies on the underlying desktop manager exposing
this type of window drawing optimization. It may not be possible
with all window mangaers to get a mapping to such fuctionality.

The workaround would be the parent window sending internal paint
messages to all child graphical controls using its device context and the
child draws within its own rect only. IE no reliance on having a clip rect
to play with. This is how most 'lightwieght' controls in MFC & VB work
at least. Lightwieght graphical controls do not have their own window
but are reliant on the parent for the device context etc. The handle they
are allocated is used internally and not through normal windows handles.

Regions will be a real pain to implement and frankly if we come up with
a generic quick enough workaround then we ought to stick with it, as I said
not all desktop managers may give the option for this lightweight control


More information about the Lazarus mailing list