vs2003项目转换成vs2010项目常出错误

http://forums.codeguru.com/archive/index.php/t-380568.html

I Managed to locate the shortcut to activate this SDK with windows. So all goes well untill.....

Please find at the botton the errors I get when I use the
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif

As you can see I no longer get LVINSERTMARK and GetInsertMark errors, but MFC spits the dummy over PSCROLLBARINFO and CCM_SETWINDOWTHEME.

Has anybody got any ideas here about what to do?

Thankyou,
Jonathan.

c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(3289): error C2061: syntax error : identifier 'PSCROLLBARINFO'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(148): error C2065: 'PSCROLLBARINFO' : undeclared identifier
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(148): error C2146: syntax error : missing ')' before identifier 'pScrollInfo'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(148): error C2761: 'BOOL CScrollBar::GetScrollBarInfo(void) const' : member function redeclaration not allowed
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(148): error C2059: syntax error : ')'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(149): error C2143: syntax error : missing ';' before '{'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin4.inl(149): error C2447: '{' : missing function header (old-style formal list?)
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxcmn3.inl(18): error C2065: 'CCM_SETWINDOWTHEME' : undeclared identifier
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxcmn3.inl(21): error C3861: 'CCM_SETWINDOWTHEME': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxcmn3.inl(27): error C3861: 'CCM_SETWINDOWTHEME': identifier not found, even with argument-dependent lookup
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxcmn3.inl(44): error C3861: 'CCM_SETWINDOWTHEME': identifier not found, even with argument-dependent lookup

gregmiller01
October 8th, 2009, 06:07 PM
I realize this thread is 3 1/2 years old, but after searching for this error:
"error C3861: 'CCM_SETWINDOWTHEME': identifier not found, even with argument-dependent lookup" and finding no solution I figured that I might not be the last one to experience this. My problem started when I wanted to use the LVS_EX_DOUBLEBUFFER flag in a CListCtrl.

To fix this problem, make your stdafx.h file look like this:

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.
#endif
 
或者在c/c++预处理器中定义
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值