我正在尝试创建一个简单的 xll 文件,但我不能按照 msdn 站点 http://support.microsoft.com/kb/178474中的教程进行操作, 但本教程适用于 Microsoft Excel 97 Developer's Kit,我只有 2007 版和 Visual Studio 2005,所以这可能是导致错误的原因:
1>------ Build started: Project: Anewxll, Configuration: Debug Win32 ------
1>Compiling...
1>Anewxll.cpp
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(97) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5031): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5033): or 'int AfxMessageBox(UINT,UINT,UINT)'
1> while trying to match the argument list '(const char [21], long)'
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(140) : error C2665: 'AfxMessageBox' : none of the 2 overloads could convert all the argument types
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5031): could be 'int AfxMessageBox(LPCTSTR,UINT,UINT)'
1> c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(5033): or 'int AfxMessageBox(UINT,UINT,UINT)'
1> while trying to match the argument list '(char [8192], long)'
1>c:\nam\test\anewxll\anewxll\anewxll.cpp(174) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [14]' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast