[lazarus] Non-visual component drawing

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Oct 27 10:32:02 EST 2003


On Mon, 27 Oct 2003 16:23:16 +0100
Micha Nelissen <M.Nelissen at student.tue.nl> wrote:

> Nelissen, M. wrote:
> 
> > Mattias Gaertner wrote:
> > 
> >>For win32 the normal paint messages should be enough. Please test, if
> >the>designer is getting the paint messages and if they are handled at the
> >right>time (after letting the control draw itself). 
> >>Maybe we need to adapt the BeginPaint, EndPaint to the designer.
> > 
> > 
> > I now understand better. TWinControl.WMPaint needs to send the lm_paint 
> > through the perform method, not only call WMPaint.
> > 
> > However, now I have another problem: the designerdevicecontext.FDCSize 
> > is (0,0) and stays so. The line GetDeviceSize (designerprocs.pas:286) 
> > never gets executed. Can you help me?
> 
> On second thought, it does get executed, but GetDeviceSize is not 
> implemented for win32, because it is not possible to retrieve the size 
> of a device context given a specific handle. Please advise :(.

Is it possible to find out, if a handle is a window and return the size?
Otherwise return false.


Mattias






More information about the Lazarus mailing list