ON_COMMAND_RANGE() is running well in debug mode.
But in release mode, I always get:
Unhandled exception in xxx.exe: 0xC0000005: Accesss Violation
ON_CONTROL_RANGE requires an argument.
Like with the macro ON_MESSAGE, this code workes fine in debug mode without any indication of a failure, although any of required function arguments are missing. So there's the big problem on how to find a bug that's only visible in release mode.