I\'m working on an MFC application, that got pretty messy over years and over different teams of developers. The resource.h file, which contains all command/message mappings
You are mixing two things:
There is probably no need for you to edit resource.h manually.
I would recommend to use the "Resource symbols" tool (right click on the resources in resource view and choose from the popup menu, I assume you are using VC++), to remove all the unused IDs from resource.h.