It's not clear what you are trying to do here.
Inheriting directly from CWindow and declaring a message map seems to be the problem. Remove the message map from class 'base" and according to the ATL documentation the BEGIN_MSG_MAP macro in class derived should reference derived, not base. Don't forget that other ATL Window classes inherit from CMessageMap which contains a virtual ProcessWindowMessage function.