[lazarus] Device Contexts
Peter Dyson
peter at skel.demon.co.uk
Thu Mar 9 13:06:59 EST 2000
I just noticed what could be a problem with the
current device context implementation.
As I see it when a TWinControl or descendent
is created a TDeviceContext is added to the
DeviceContexts list. This is the windows equivalent
of a private DC defined in the window flags, the DC
value allocated is just index in this list.
However in GetDC there is no checking of the window
flags for private DC and it just creates a new DC with
default values. I can't see this is a limitation of gtk as
we are already are storing the pointers to the GC in the
the TDeviceContext.
Ther are many times when you need to call GetDC
just to get a mapping of the hWnd to the DC.
Does GetDC need fixing? or am I missing something
here.
Peter
More information about the Lazarus
mailing list