"windows.h" 呗!
给你个实例——“hello world”
#include
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0) ;
return 0 ;
}
一段简单的示例代码.
先声明API函数GetClassName,FindWindow;
然后在程序中调用就可以了。
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpclassname As String, ByVal nMaxCount As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpclassname As String, ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Dim lpclassname As String
Dim chwnd As Long
Dim rh As Long
Dim lhwnd As Long
Shell "calc.exe"
chwnd = FindWindow(vbNullString, "计算器")
lpclassname = Space(255)
GetClassName chwnd, lpclassname, 255
End Sub
声明就可以了
只要写出来是WINdows支持的API就行了