MFC macros and maintaining consistency
-
Dear all,
dealing with MFC has become more and more rare these days, but someone has to look after all those existing applications, right?
Well, this is how I got to learn MFC these days, though the style is a bit out of date and it's been giving me a hard time to find my way into it.
Worst thing I have come to notice is probably the macros used throughout MFC. Most of them like BEGIN_MESDSAGE_MAP or IMPLEMENT_DYNCREATE require class and parent class as arguments. So far, that's not bad. But if later on you change your class hierarchy and forget to update your macros, you'll be in for all kinds of troubles... sometimes outright cruel and sometimes subtle. The latter one bothers me most and it's repeatedly taken me days to figure out the reason for probably some messages being routed the wrong way.So, I finally get to the point of my question.
Is there a way to maintain consistency of your MFC-macros and your class hierarchy automatically? Since doing it by hand seems to be doomed for failure somewhere along the path.Well... any help or any suggestions on how to keep those macros and class hierarchy up-to-date would be appreciated.
Thanks!
Pelle.