Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-11

Bug in Win32 code

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Martin Smat: there is a serious bug in Windows specific code. This is in file win32proc.inc. The…
Show quoted text 8 lines
Hi, there is a serious bug in Windows specific code. This is in file win32proc.inc. The result value in function ObjectToHwnd(...) is in some cases uninitialized (for example when using toolbarbuttons - AObject is TWinControl but AObject.HandleAllocated returns False), which often causes Windows crashing. Now I�m able to run toolbar example without crashing Windows. Please apply the attached patchfile for fixing this.

Thx. Applied.

Mattias

Reply by email

Martin Smat

Hi,
there is a serious bug in Windows specific code. This is in file win32proc.inc. The result value in function ObjectToHwnd(...) is in some cases uninitialized (for example when using toolbarbuttons - AObject is TWinControl but AObject.HandleAllocated returns False), which often causes Windows crashing. Now I�m able to run toolbar example without crashing Windows. Please apply the attached patchfile for fixing this.

And now one question. Does anybody know how to create a handle for toolbarbuttons in Win32 API?
The handle is IMO needed because of endless loop when handle = 0 (but I�m not 100% sure).

Martin Smat.

585a586

Handle := 0;

614d614
< Handle := 0;
617c617
< If handle = 0 Then
---

If Handle = 0 Then

Reply by email