[[lazarus] Design issues]

Nico Aragon nico at wanadoo.es
Wed Feb 23 15:16:21 EST 2000


Hola,

Escribía Michal Bukovjan <mbukovjan at netscape.net>, hablando de Re:
[[lazarus] Design issues] con fecha 22 Feb 00 11:57:31 MET,

>BTW, I wonder even Borland uses CM_??? concept which seems to me redundant on
>many places. Does anybody know why use these internal CM_ messages at all?

Did you mean "CN_"?

These are component notification messages. Application fetches all
messages from app queue provided by Windows in the loop inside
Application.ProcessMessages. In conventional Windows programs the
message is sent unchanged to the... (I think that it's sent to the)
parent window of the control (~the form). In Delphi the message is
converted to a CN_ notification message and sent directly to the
component.

The component is able to preview it, overriding its CN_xxx method. By
default it converts the message back to a standard Windows message and
call its own default proc (the associated Windows control). From this
moment, the message runs the "normal" journey in non-Delphi Windows
apps.

Why this intermediate step?. Because Delphi lets the component to
review what's coming for it before it's thrown to the Windows way of
message distribution. In other words: components code are part of the
application logic that is descentralized. 

greetings

  Nico






More information about the Lazarus mailing list