[Lazarus] Fastest way to draw

Brad Campbell brad at wasp.net.au
Fri May 21 15:30:45 CEST 2010


Zitat von faber <faber.cpu at gmail.com>:

>>
>>
>> Weird.
>> The order should not matter for the winapi. I hope some winapi expert has
>> seen something like this and can give some hint.
>> Maybe the SR1 is not at the right position.
>> In the unit lcl/interfaces/win32wscontrols.pp in procedure
>> TWin32WSWinControl.SetBounds after the line AdaptBounds you can add a
>> debugln:
>>
>>  debugln(['TWin32WSWinControl.SetBounds ',dbgsname(AWinControl),'
>> l=',IntfLeft,' t=',IntfTop,' w=',IntfWidth,' h=',IntfHeight,'
>> suppress=',suppressMove]);
>>
>> Is SR1 getting the right bounds?
>>
>>
> on good working:
>
> set sr1 to visible
> 450-:-743 -1
> TWin32WSWinControl.SetBounds SR1:TStringGrid1 l=2 t=21 w=743 h=450
> suppress=False
> 450-:-743 -1
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True
> TWin32WSWinControl.ShowHide :TStringGrid1 False
> TWin32WSWinControl.SetBounds OptsR:TArrow l=11 t=1 w=19 h=19 suppress=False
> TWin32WSWinControl.ShowHide OptsR:TArrow True
> TWin32WSWinControl.ShowHide StopA:TButton False
>
> on not good working:
>
> TWin32WSWinControl.ShowHide StopA:TButton False
> set sr1 to visible
> TWin32WSWinControl.ShowHide :TStringGrid1 False
> 449-:-743 -1
> TWin32WSWinControl.SetBounds OptsR:TArrow l=11 t=1 w=19 h=19 suppress=False
> TWin32WSWinControl.SetBounds SR1:TStringGrid1 l=2 t=21 w=743 h=449
> suppress=False
> 449-:-743 -1
> TWin32WSWinControl.ShowHide OptsR:TArrow True
> TWin32WSWinControl.ShowHide SR1:TStringGrid1 True

Thanks. So in both cases the bounds are correct and are sent before the Show.
(Please double check that there are no ShowHide or SetBounds after  
this for the grid).
The only difference seems to be the time when the button and the the  
other grid is hidden.
Maybe there is something wrong with the parent control or the paint  
event for the grid does not work (or you have a memory bug).

Paul, do you have seen something like that before?
What can prevent a window to appear?


Mattias







More information about the Lazarus mailing list