Visual Studio 2010 MFC错误 [英] Visual Studio 2010 MFC Bug
问题描述
我正在Windows 7上使用Visual Studio 2010 Ultimate.似乎我无法使用MFC做任何事情.当我尝试创建MFC应用程序时,甚至在添加代码之前,我都会收到此错误........
错误1错误C2039:InitNetworkAddressControl; :不是; CShellWrapper;的成员. c:\ program files \ microsoft visual studio 10.0 \ vc \ atlmfc \ include \ afxcomctl32.inl 202 1 NFC TEST
如果我执行控制台程序,并且使用MFC是Static或DLL,则会收到相同的错误.有人知道解决方案吗?
I''m using Visual Studio 2010 Ultimate on Windows 7. It seems that I can''t do anything with MFC. When I try to create an MFC application, even before I add code I get this error........
Error 1 error C2039: InitNetworkAddressControl; : is not a member of ;CShellWrapper; c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcomctl32.inl 202 1 NFC TEST
If I do a console program and Use of MFC is either Static or DLL I get the same error. Does anyone know of a cure for this?
推荐答案
验证您的c:\ program files \ microsoft visual studio 10.0 \ vc \ atlmfc \ include \ afxcomctl32.h和afxcomctl32 .inl文件.
它们必须包含下一个代码:
Verify Your c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\afxcomctl32.h and afxcomctl32.inl files.
They must contain next code:
class CShellWrapper : public CDllIsolationWrapperBase
{
public:
CShellWrapper()
: CDllIsolationWrapperBase(_T("shell32.dll"))
{
}
public:
AFX_ISOLATIONAWARE_FUNC(BOOL,InitNetworkAddressControl, (void), (),FALSE)
};
和:
and:
#define SHELL_AFXCTXFUNC(type, name, params, args) \
inline type WINAPI AfxCtx##name##params \
{ \
return afxShellWrapper->_##name##args; \
}
SHELL_AFXCTXFUNC(BOOL ,InitNetworkAddressControl,(void),())
这篇关于Visual Studio 2010 MFC错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!