使用VC6时:关于WinAPI的版本问题。

最近偶然用到一个结构体:SCROLLBARINFO ,编译(用到VC6+SP6)时无法通过,提示未找到其定义。仔细查看了一下API文档,提到:

HeaderDeclared in Winuser.h, include Windows.h
Minimum operating systemsWindows 98, Windows NT 4.0 with Service Pack 6

觉得没啥问题啊,只好把Winuser.h打开来看了看,发现居然要求WINVER>=0x500,而VC6提供的API的windows.h里的默认版本定义是0x400(VC7带的API头已经升到0x500以上了)。

于是,只好自已强制预定义了。 #define WINVER  0x500。编译OK,VC6出现如下提示:

NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications.  To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.

其实,不用理它,都什么年代了,文中提到的Windows版本可以不管它了。我想这也是MS的VC6多年不发展,带来的问题吧。想想VC6已经是好多好多年前的产品了。

石头于 2005-03-19

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值