The MASM Forum

General => The Campus => Topic started by: jj2007 on March 15, 2019, 09:36:43 AM

Title: WM_COMMAND or WM_NOTIFY?
Post by: jj2007 on March 15, 2019, 09:36:43 AM
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 (https://devblogs.microsoft.com/oldnewthing/?p=32093)):
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)