欢迎访问:常州市武进区嘉泽中心小学网站 !今天是:
栏目列表
您现在的位置是:首页>>教师>>计算机技术>>程序设计>>杂项>>文章内容
使用VC6时:关于WinAPI的版本问题。
发布时间:2008-11-20   点击:   来源:本站原创   录入者:佚名
 

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

HeaderDeclared in Winuser.h, include Windows.hMinimum 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
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


附件:
    关闭窗口
    打印文档
    账号登录
    保持登录 忘记密码?
    账号与武进教师培训平台同步