When looking at Delphi source code, I often see messages declarations from the Windows API, such as CN_NOTIFY
and WM_NOTIFY
. I would like to know the differences between them and when they should be used?
WM
messages are used by the Win32 API, and end user code.
CM
and CN
messages are used internally by the VCL.
When the VCL processes certain WM
notifications from the Win32 API, like WM_COMMAND
and WM_NOTIFY
, which are sent from a child control to its parent window, the VCL reflects them as CN
messages (CN_COMMAND
and CN_NOTIFY
) back to the child that sent them. This allows VCL controls to handle their own notifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With