Reputation: 15069
I've created a clean (non MFC) atl project, Added a dialog and some bitmaps, when compiling I get 3 MFC relate errors:
WINDOWS.H already included. MFC apps must not #include @ afxv_w32.h
Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d] @ afx.h
Since this project has nothing to do with MFC - why do I get these errors ? (in project settings under: "Use of MFC" = Use Standart Windows Libraries.
I've checked the Preprocessor defines: WIN32 _WINDOWS _DEBUG _USRDLL
nothing here as well.
Any ideas ?
UPDATE: I've found what I've done wrong. Instead of adding the dialog from the Class Wizard, I've created it in the resource view and than added a class. This creates an MFC class and not an ATL class.
Upvotes: 1
Views: 373
Reputation: 15069
I figured out what was wrong, updating here, for future users, as documentation of ATL is very poor.
I've added a dialog in resource view, and than added a class for it. That was the mistake. the class that was added was MFC class, although project was not supposed to support MFC.
If you wish to keep the project clean (from MFC) you need to add the dialog through Class View Add Class as described in this article:
If it wasn't ATL I would have posted it as a bug to MS, but I don't think they still care about this technology.
Upvotes: 0