[lazarus] Messages, comments please

Marc Weustink weus at quicknet.nl
Sun Dec 5 10:19:10 EST 1999


While looking through the LM_xxx messages, I found that there were windows
compatibility messages and that there were lcl messages. The message ranges
were mixed, for instance LM_SYSKEYDOWN = $0104 and LM_ACTIVATEITEM =
LM_User+4 (LM_USER was $100) To avoid this I changed (temporary ?) LM_USER
to $400 to get them out of the windows range. Both messages are used for
events from the system to lclcomponents and lcl messages are allso used for
communication from lclcomponents to the interface layer. This might lead to
confusion (at least for me when I joined this project)
Seen this I came to he following thoughts:

* Maybe we should have a different prefix for messages to the interfaces or
messages to lcl components

* If we have different prefexes, we could the change the prefix for
messages to lclcomponents to WM_ (since these messages are primary handled
by window based components ;-) Another advantige is the portability of
existing code (like mwEdit, btw where is WM_SIZE declared?)

Another point is that there are duplicate messeges for the same event (like
LM_DRAW/LM_PAINT and LM_FOCUS/LM_SETFOCUS). Where possible (and clear) I
tend to remove them.

Any comments on this ??

Marc







More information about the Lazarus mailing list