NOTE: I love discussing game design (especially if it's something within the realm of my understanding), and I ended up rambling on a little bit. Sorry.
I don't think there's a dynamic way of doing it. Maybe if you could somehow get access to all of the resources available, then go through them one by one (must like you would if they were files stored in a folder). However, you'd still have to know which cells go with which object. How else would you determine which cell goes with which object if you don't have a hardcoded ID? I personally prefer the hardcoded ID because I have a GraphicManager which keeps track of which graphics are being referenced, which ones need to be created, and which ones need to be destroyed. All graphics I need are retrieved via GraphicManager::Reference(Resource ID);
In any case.. the only "dynamic" solution I can think of would be to try and store the resource.h file as a resource itself, then parse it for #define GFX_* values.
It sounds like you have all of your animation frames (or cells as you call them) as seperate graphics. If this is the case, perhaps you could store the entire animation as a single graphic, then dynamically create the cells when it's loaded. This would at the very least dramatically cut down on your code that needs to be hardcoded. I have a Graphic and Animation class that does just that. Now instead of having to load 32 individual cells for a single animation, you only have to create a single graphic, then have an animation class handle all of the animation stuff for you.
Personally, I have all of the animations for an object stored in a single graphic image (walking, running, jumping, etc.). I then have a Graphic class which breaks it down into an array of cells. After that, I have individual Animation objects which encapsulate Graphic objects and control animations (there are several Animation objects per Graphic object). All of my Graphics are kept track of in a GraphicManager, and Animations are created via AnimationFactory.