remove non-useful variable wndlist (thx vincent)

git-svn-id: trunk@4900 -
This commit is contained in:
micha 2003-12-18 10:17:00 +00:00
parent 6ff2c7cbb9
commit e8d7c82083
3 changed files with 11 additions and 30 deletions

View File

@ -165,9 +165,6 @@ Const
ClsName : array[0..20] of char = 'LazarusForm'#0;
ToolBtnClsName : array[0..20] of char = 'ToolbarButton'#0;
Var
WndList: TList;
{$I win32proc.inc}
{$I win32listsl.inc}
{$I win32callback.inc}
@ -178,19 +175,19 @@ Var
Initialization
Assert(False, 'Trace:win32int.pp - Initialization');
WndList := TList.Create;
Finalization
Assert(False, 'Trace:win32int.pp - Finalization');
WndList.Free;
WndList := Nil;
End.
{ =============================================================================
$Log$
Revision 1.62 2003/12/18 10:17:00 micha
remove non-useful variable wndlist (thx vincent)
Revision 1.61 2003/12/18 08:51:01 micha
fix accelerators: now registered per window

View File

@ -1345,12 +1345,6 @@ Begin
SendMessage(Window, Msg, Limit, 0);
SetProp(Window, 'LIMIT_TEXT', @Limit);
If WndList.IndexOf(Pointer(Window)) = -1 Then
Begin
WndList.Capacity := WndList.Count;
WndList.Add(Pointer(Window));
End;
End;
{------------------------------------------------------------------------------
@ -2893,6 +2887,9 @@ End;
{
$Log$
Revision 1.144 2003/12/18 10:17:00 micha
remove non-useful variable wndlist (thx vincent)
Revision 1.143 2003/12/18 08:51:01 micha
fix accelerators: now registered per window

View File

@ -2531,26 +2531,10 @@ End;
for a properties-enumeration function that's called when the program is quit.
------------------------------------------------------------------------------}
Function TWin32Object.SetProp(Handle: HWND; Str: PChar; Data: Pointer): Boolean;
Var
C: Cardinal;
WndListed: Boolean;
Begin
Assert(False, 'Trace:TWin32Object.SetProp - Start');
WndListed := False;
If WndList.Count > 0 Then
For C := 0 To WndList.Count - 1 Do
If HWND(WndList[C]) = Handle Then
WndListed := True;
If Not WndListed Then
Begin
WndList.Capacity := WndList.Count;
WndList.Add(Pointer(Handle));
End;
Result := Windows.SetProp(Handle, Str, Integer(Data));
Assert(False, Format('Trace:TWin32Object.SetProp --> Window handle: 0x%X, Propery to set: %S, Data to set: 0x%P, Window was previously in list: %S, Property was successfully set: %S', [Handle, String(Str), Data, BOOL_RESULT[WndListed], BOOL_RESULT[Result]]));
Result := Windows.SetProp(Handle, Str, LongInt(Data));
Assert(False, Format('Trace:TWin32Object.SetProp --> Window handle: 0x%X, Propery to set: %S, Data to set: 0x%P, Property was successfully set: %S', [Handle, String(Str), Data, BOOL_RESULT[Result]]));
End;
{------------------------------------------------------------------------------
@ -2842,6 +2826,9 @@ end;
{ =============================================================================
$Log$
Revision 1.83 2003/12/18 10:17:00 micha
remove non-useful variable wndlist (thx vincent)
Revision 1.82 2003/12/16 08:33:31 micha
UINT(-1) fix causing "Out of bounds." exception