No, you can't really do what you're asking, but you probably don't have to. (Some more details of your problem may be in order.) When you create a message map, you specify both the class to which it applies and the base class for that class. If your derived class doesn't have a message map entry for a particular message, MFC will check the message map for the base class. If the base class message map has no entry, it will check the message map for its base class, and so on.
For example, suppose you have a bunch of dialogs with common functionality. You could lay out your classes thusly:
class CMyBaseDialog : public CDialog {
DECLARE_MESSAGE_MAP();
}
BEGIN_MESSAGE_MAP(CMyBaseDialog, CDialog)
// Handle any common messages here...
END_MESSAGE_MAP()
class CDerivedDialog : public CMyBaseDialog {
DECLARE_MESSAGE_MAP();
}
BEGIN_MESSAGE_MAP(CDerivedDialog, CMyBaseDialog)
// Handle any specific messages here...
END_MESSAGE_MAP()
The same applies to all other HWND based classes, such as CWnd, CView, CFrame, and so on. If you're dealing specifically with command messages, then you have some additional options.