News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

WM_COMMAND or WM_NOTIFY?

Started by jj2007, March 15, 2019, 09:36:43 AM

Previous topic - Next topic

jj2007

Sometimes notifications like LBN_SELCHANGE or NM_CLICK are sent via WM_COMMAND, sometimes as WM_NOTIFY. Here is why (Raymond Chen, The Old New Thing):
QuoteA modern control designer is more likely to use WM_NOTIFY notifications since they allow additional information to be passed with the notification. The WM_COMMAND message, by comparison, passes only the notification itself; the other parameters to the WM_COMMAND message are forced, as we'll see below. If WM_NOTIFY is superior to WM_COMMAND, why do some controls use WM_COMMAND? Because WM_NOTIFY wasn't available until Windows 95.

In short: There is no good reason for this confusion. You'll just have to study the docs carefully 8)