C++ 怎么api

来源:百度知道 编辑:UC知道 时间:2024/05/31 18:07:25
C++里怎么用API啊?
和我怎么知道这个函数要#include 什么头文件啊?
VC++6.0

最好写个例子出来看看
就用FindWindow 后FlashWindow 一下,

API 就一个 windows.h 够用了
想知道都有什么API 可以看MSDN 或者 API函数查询手册

查看MSDN了,当你用到一个API函数时,一般在它的底下(Requirements )会给出他需要什么头文件
HWND hwnd=FindWindow(注册窗口名,窗口名);
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

#include<windows.h>
HWND h_gTemp = ::Findwindow(NULL,L"无标题 - 记事本");

去MSDN 里查 ··
所有的API 函数在 MSDN里都有 详细的解释 和例子