The RegisterWindowMessage Function (Windows)[^] defines a new window message that is guaranteed to be unique throughout the system, and is designed to generate at runtime message IDs that could be used for inter-process communications: using it solve your problem, but it could not be a good idea if you use it extensively, because it waste system resources. Anyway, the changement you are evaluating, requires that you manually modify the resource.h file on your project to remove the correspondant #define and produce a situation where the resource editor is not able to load and handle your resource script file (i.e. project_name.rc), then you should modify it manually.