主题:API函数声明的问题
llydd
[专家分:200] 发布于 2006-06-20 11:28:00
调用API之前必须在程序开头写上windows.h,windows.h里面包含了你要调用的API函数的声明?可是如果我要调用MessageBox这个API函数,可是怎么在windows.h里没有发现对它的声明,[em10]
回复列表 (共4个回复)
沙发
aaronwang [专家分:16870] 发布于 2006-06-20 14:25:00
有时间多看看MSDN.
MSDN在解释每一个函数的时候,最后面都给出了这个函数对操作系统的要求,头文件,库文件.这是关于MessageBox的.
Minimum DLL Version user32.dll
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as ANSI and Unicode versions.
板凳
llydd [专家分:200] 发布于 2006-06-20 17:29:00
3Q
3 楼
llydd [专家分:200] 发布于 2006-06-20 17:36:00
为何我的MSDN只有
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows and Windows NT
4 楼
aaronwang [专家分:16870] 发布于 2006-06-20 19:43:00
MSDN版本不一样.
我来回复