[lazarus] ExcludeClipRect function
peter at skel.demon.co.uk
Tue Mar 14 13:45:24 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
Ok I have been looking into this a bit deeper. Here is what
I think is happening.
Originally MS used to do graphical controls by ensuring they got
in the paint msg list before the parent, and used Exlude rect to stop
the parent from overwriting. After all if the child got the message
and returned msg handled the parent would never have painted.
Later however they now have toolbars with backgrounds which means
the parent has to draw first, and the child(which is not a window) gets
to draw next, doing transparent drawing. This must mean they now
generate private msgs to children that are not full windows ( which
never ever get a paint msg from the desktop handler)
I think we ought to take the second approach to grahical controls.
This should deprecate the need for ExcludeClipRect functions
completely. We can handle other broken code in a more kludgy
way later, keeping the LCL controls with a clean design.
This would also mean that a container syle control has to keep track
of grahical controls and send it internal msgs for mouse movement
paint et al. Handling graphical controls in this fashion is much cleaner
and easier than trying to build all the older API which are probably
not used much except for compatibity with older versions of windows.
The other alternative is to make a graphical control a full window
and lose the windows optimisation part of graphical controls, and
More information about the Lazarus