Author Topic: WM_COMMAND or WM_NOTIFY?  (Read 214 times)


  • Member
  • *****
  • Posts: 9401
  • Assembler is fun ;-)
    • MasmBasic
« 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):
A 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)