I am trying to port some code from VS2003 to VS2005 but I am having some problems (to be clear: the code compiles without error on VS2003). I have narrowed the problem down to this simple test case: -
cl -c -MD -DNO_STRICT test.cpp
where test.cpp only contains: -
#include <atlbase.h>
#include <atlhost.h>
When I compile this I receive the following error: -
C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\atlwin.h(3281) : error C2440: 'return' : cannot convert from 'INT_PTR (__stdcall *)(HWND,UINT,WPARAM,LPARAM)' to 'DLGPROC'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\atlwin.h(3280) : while compiling class template member function 'DLGPROC ATL::CDialogImplBaseT<TBase>::GetDialogProc(void)'
with
[
TBase=ATL::CWindow
]
C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\atlwin.h(3819) : see reference to class template in
stantiation 'ATL::CDialogImplBaseT<TBase>' being compiled
with
[
TBase=ATL::CWindow
]
C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\atlwin.h(3851) : see reference to class template instantiation 'ATL::CSimpleDialog<t_wDlgTemplateID,t_bCenter>' being compiled
If I disable STRICT type checking by using: -
cl -c -MD test.cpp
the code compiles without any errors.
Am I missing something fundamental here
Thanks in advance
Blair