error C2504: 'CControlBar' : base class undefined
The error comes when compiling the afxole.h MFC header files:
#include <afx.h>
#include <afxext.h>
#include <afxole.h>
#include <afxtempl.h>
After some research, we found out that afxole includes afxext which includes afxwin which itself includes afxole. In afxwin.h, the following include towards the end of the file causes the error:
#ifdef _M_CEE
#include <atliface.h>
#include <afxole.h>
#endif
The solution:
(arguably not very clean)
- In afxwin.h, comment out the useless include <afxole.h> line in order to compile our projects.