[Lazarus] LCL Message handling

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Oct 19 13:19:32 CEST 2011


On Wed, Oct 19, 2011 at 1:56 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> Can somebody explain the purpose of e.g. WindowProc, WndProc and
> MainWndProc, in the LCL?

Delphi compatibility. AFAIK WndProc works for messages >= WM_USER

> In Delphi MainWndProc calls the handler assigned to WindowProc, enclosed in
> try-finally and try-except blocks. WindowProc typically is initialized with
> WndProc. Why is this implemented differently in the LCL, and how?

I remember that some people did not like how this worked in Delphi so
it didn't work like that, then we had a define to pass messages >=
WM_USER to WndProc. I think the define later got changed into always
active. I don't remember anyone asking for messages < WM_USER, so
probably till now they are not passed to WndProc. I'm just typing from
memory, so I could be wrong in parts of this.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list