WM_COMMAND WM_NOTIFY自定义通知代码

问题描述:

我希望定义一个新的命名ID,该ID将用于我的子类控件的WM_COMMAND消息中.但是我找不到创建用户控件定义的通知代码的任何规则.

I wish to define a new nofication id that will be used in WM_COMMAND messages of my subclassed control. But I failed to find any rules of creating user control-defined notification codes.

请参阅技术说明20、21和22:

See technical note 20, 21 and 22 on that:

TN021:命令和消息路由

TN022:标准命令实现

简短的答案:选择0x8000-0xDFFF范围内的数字.

Short answer: pick a number in the range 0x8000 - 0xDFFF .