On 8/31/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
Is labels TGraphicControl.WMPaint called?
No, it's never called.
However, TScrollingWinControl.WMPaint (The paint event of a TForm ) is
called twice. The first time is right after the SlotPaint event
received from Qt. Here the DC parameter is zero as I would expect.
Then, after some winapi functions that same event happens again, but
now with DC different from zero. All occurs according to the code on
TWinControl.WMPaint function.
Everything seams right to me.
Is Message.DC <> 0?
No, Message.DC is zero. On Qt the DC only exists inside the Paint
event, so when the event is called there is no DC yet. Should I create
one on the message handler routine? I just thought that LCL would call
GetDC in case it is zero, and it seams to be doing this.
Add some debugln and test, what is called and what not.
I just compared to the output from the same project compiled for Gtk widgetset:
*** TScrollingWinControl.WMPaint DC=-1214582764
*** TGraphicControl.WMPaint DC=-1214582764
Here TScrollingWinControl is called only once, and with the DC already
set. Next TGraphicControl.WMPaint is called.
But the Message.DC thing isn't the problem. I followed the
TScrollingWinControl.WMPaint procedure step-by-step and I think I
found the problem.
Because of several missing winapi functions, LCL thinks that the Label
exists, but is not visible, because it may be hidden behind another
component.
More specifically I need to check which winapi calls I need to
implement so TWidgetSet.RectVisible on intfbasewinapi.inc will say
that the label can be painted.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives