明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1561|回复: 4

[经验] API函数手册

[复制链接]
发表于 2020-8-26 20:01 | 显示全部楼层 |阅读模式
本帖最后由 1291500406 于 2020-9-19 06:55 编辑

A
AbortDoc
AbortPath
AbortPrinter
About
ActivateKeyboardLayout
AddFontResource
AddForm
AddJob
ADDJOB_INFO_1
AddMonitor
AddPort
AddPrinter
AddPrinterConnection
AddPrinterDriver
AddPrintProcessor
AddPrintProvidor
AdjustWindowRect
AdvancedDocumentProperties
AngleArc
AnyPopup
api_net1
AppendMenu
Arc
ArrangeIconicWindows
AttachThreadInput
B
Beep
BeginDeferWindowPos
BeginPath
BitBlt
BITMAP
BringWindowToTop
BroadcastSystemMessage
BY_HANDLE_FILE_INFORMATION
C
CallNamedPipe
CancelDC
CancelWaitableTimer
CascadeWindows
CharToOem
CheckMenuItem
CheckMenuRadioItem
ChildWindowFromPoint
Chord
ClientToScreen
ClipCursor
CloseEnhMetaFile
CloseFigure
CloseHandle
CloseMetaFile
ClosePrinter
CloseWindow
CombineRgn
CombineTransform
CompareFileTime
ConfigurePort
ConnectNamedPipe
ConnectToPrinterDlg
ConvertDefaultLocale
CopyEnhMetaFile
CopyFile
CopyIcon
CopyImage
CopyMetaFile
CopyRect
course1
course2
course3
course4
course5
CPINFO
CreateBitmap
CreateBitmapIndirect
CreateBrushIndirect
CreateCaret
CreateCompatibleBitmap
CreateCompatibleDC
CreateCursor
CreateDC
CreateDIBitmap
CreateDIBPatternBrush
CreateDIBSection
CreateDirectory
CreateEllipticRgn
CreateEllipticRgnIndirect
CreateEnhMetaFile
CreateEvent
CreateFile
CreateFileMapping
CreateFont
CreateFontIndirect
CreateHatchBrush
CreateIC
CreateIcon
CreateIconIndirect
CreateMailslot
CreateMenu
CreateMetaFile
CreateMutex
CreateNamedPipe
CreatePatternBrush
CreatePen
CreatePenIndirect
CreatePipe
CreatePolygonRgn
CreatePolyPolygonRgn
CreatePopupMenu
CreateProcess
CreateRectRgn
CreateRectRgnIndirect
CreateRoundRectRgn
CreateScalableFontResource
CreateSemaphore
CreateSolidBrush
CreateWaitableTimer
ctr_msg1
ctr_msg2
ctr_msg3
ctr_msg4
ctr_msg5
ctr_msg6
D
DeferWindowPos
DeleteDC
DeleteEnhMetaFile
DeleteFile
DeleteForm
DeleteMenu
DeleteMetaFile
DeleteMonitor
DeleteObject
DeletePort
DeletePrinter
DeletePrinterConnection
DeletePrinterDriver
DeletePrintProcessor
DeletePrintProvidor
DestroyCaret
DestroyCursor
DestroyIcon
DestroyMenu
DestroyWindow
dev_con_tab
DeviceCapabilities
DeviceIoControl
DEVMODE
DisconnectNamedPipe
DOCINFO
Document8s
DocumentProperties
Documents
Documents1
Documents2
Documents3
Documents3_1
Documents3_2
Documents4
Documents5
Documents6
Documents7
DosDateTimeToFileTime
DPtoLP
DrawAnimatedRects
DrawEdge
DrawEscape
DrawFocusRect
DrawFrameControl
DrawIcon
DrawIconEx
DrawMenuBar
DrawState
DrawText
DrawTextEx
DuplicateHandle
DuplicateHandle_Table
E
Ellipse
EnableMenuItem
EnableWindow
EndDeferWindowPos
EndDocAPI
EndDocPrinter
EndPage
EndPagePrinter
EndPath
ENHMETAHEADER
EnumCalendarInfo
EnumChildWindows
EnumDateFormats
EnumEnhMetaFile
EnumFontFamilies
EnumFontFamiliesEx
EnumFonts
EnumForms
EnumJobs
EnumMetaFile
EnumMonitors
EnumObjects
EnumPorts
EnumPrinterDrivers
EnumPrinters
EnumPrintProcessorDatatypes
EnumPrintProcessors
EnumSystemCodePages
EnumSystemLocales
EnumThreadWindows
EnumTimeFormats
EnumWindows
EqualRect
EqualRgn
Escape
ExcludeClipRect
ExcludeUpdateRgn
ExitProcess
ExitWindowsEx
ExpandEnvironmentStrings
ExtCreatePen
ExtCreateRegion
ExtFloodFill
ExtractAssociatedIcon
ExtractIcon
ExtSelectClipRgn
ExtTextOut
F
files1
files2
files3
files4
files5
files6
files7
files8
FILETIME
FileTimeToDosDateTime
FileTimeToLocalFileTime
FileTimeToSystemTime
FillPath
FillRect
FillRgn
FindClose
FindCloseChangeNotification
FindClosePrinterChangeNotification
FindExecutable
FindFirstChangeNotification
FindFirstFile
FindFirstPrinterChangeNotification
FindNextChangeNotification
FindNextFile
FindNextPrinterChangeNotification
FindWindow
FindWindowEx
FlashWindow
FlattenPath
FloodFill
FlushFileBuffers
FlushViewOfFile
FORM_INFO_1
FrameRect
FrameRgn
FreeEnvironmentStrings
FreeLibrary
FreePrinterNotifyInfo
G
GdiComment
GdiFlush
GdiGetBatchLimit
GdiSetBatchLimit
GetACP
GetActiveWindow
GetArcDirection
GetAspectRatioFilterEx
GetAsyncKeyState
GetBinaryType
GetBitmapBits
GetBitmapDimensionEx
GetBkColor
GetBkMode
GetBoundsRect
GetBrushOrgEx
GetCapture
GetCaretBlinkTime
GetCaretPos
GetCharABCWidths
GetCharABCWidthsFloat
GetCharacterPlacement
GetCharWidth
GetClassInfo
GetClassLong
GetClassName
GetClassWord
GetClientRect
GetClipBox
GetClipCursor
GetClipRgn
GetCommandLine
GetCompressedFileSize
GetComputerName
GetCPInfo
GetCurrencyFormat
GetCurrentDirectory
GetCurrentObject
GetCurrentPositionEx
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetCursor
GetCursorPos
GetDateFormat
GetDC
GetDCEx
GetDCOrgEx
GetDesktopWindow
GetDeviceCaps
GetDeviceCaps_nIndex
GetDIBColorTable
GetDIBits
GetDiskFreeSpace
GetDiskFreeSpaceEx
GetDoubleClickTime
GetDriveType
GetEnhMetaFile
GetEnhMetaFileBits
GetEnhMetaFileDescription
GetEnhMetaFileHeader
GetEnhMetaFilePaletteEntries
GetEnvironmentStrings
GetEnvironmentVariable
GetExitCodeProcess
GetExitCodeThread
GetExpandedName
GetFileAttributes
GetFileInformationByHandle
GetFileSize
GetFileTime
GetFileType
GetFileVersionInfo
GetFileVersionInfoSize
GetFocus
GetFontData
GetFontLanguageInfo
GetForegroundWindow
GetForm
GetFullPathName
GetGlyphOutline
GetGraphicsMode
GetHandleInformation
GetIconInfo
GetInputState
GetJob
GetKBCodePage
GetKerningPairs
GetKeyboardLayout
GetKeyboardLayoutList
GetKeyboardLayoutName
GetKeyboardState
GetKeyboardType
GetKeyNameText
GetKeyState
GetLastActivePopup
GetLastError
GetLocaleInfo
GetLocalTime
GetLogicalDrives
GetLogicalDriveStrings
GetMailslotInfo
GetMapMode
GetMenu
GetMenuCheckMarkDimensions
GetMenuContextHelpId
GetMenuDefaultItem
GetMenuItemCount
GetMenuItemID
GetMenuItemInfo
GetMenuItemRect
GetMenuState
GetMenuString
GetMessagePos
GetMessageTime
GetMetaFile
GetMetaFileBitsEx
GetMiterLimit
GetModuleFileName
GetModuleHandle
GetNearestColor
GetNumberFormat
GetObjectAPI
GetObjectType
GetOEMCP
GetOutlineTextMetrics
GetOverlappedResult
GetParent
GetPath
GetPixel
GetPolyFillMode
GetPrinter
GetPrinterData
GetPrinterDriver
GetPrinterDriverDirectory
GetPrintProcessorDirectory
GetPriorityClass
GetPrivateProfileInt
GetPrivateProfileSection
GetPrivateProfileString
GetProcessShutdownParameters
GetProcessTimes
GetProcessWorkingSetSize
GetProfileInt
GetProfileSection
GetProfileString
GetQueueStatus
GetRasterizerCaps
GetRegionData
GetRgnBox
GetROP2
GetSartupInfo
GetShortPathName
GetStockObject
GetStretchBltMode
GetSubMenu
GetSysColor
GetSysColorBrush
GetSystemDefaultLangID
GetSystemDefaultLCID
GetSystemDirectory
GetSystemInfo
GetSystemMenu
GetSystemMetrics
GetSystemPowerStatus
GetSystemTime
GetSystemTimeAdjustment
GetTabbedTextExtent
GetTempFileName
GetTempPath
GetTextAlign
GetTextCharacterExtra
GetTextCharset
GetTextCharsetInfo
GetTextColor
GetTextExtentExPoint
GetTextExtentPoint
GetTextFace
GetTextMetrics
GetTheardTimes
GetThreadLocale
GetThreadPriority
GetTickCount
GetTimeFormat
GetTimeZoneInformation
GetTopWindow
GetUpdateRect
GetUpdateRgn
GetUserDefaultLangID
GetUserDefaultLCID
GetUserName
GetVersion
GetVersionEx
GetViewportExtEx
GetViewportOrgEx
GetVolumeInformation
GetWindow
GetWindowContextHelpId
GetWindowDC
GetWindowExtEx
GetWindowLong
GetWindowOrgEx
GetWindowPlacement
GetWindowRect
GetWindowRgn
GetWindowsDirectory
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
GetWindowWord
GetWinMetaFileBits
GetWorldTransform
graph1
graph2
graph3
GrayString
H
hard_sys1
hard_sys2
hard_sys3
hard_sys4
hard_sys5
hard_sys6
hard_sys7
hdc1
hdc2
hdc3
hdc4
hdc5
HideCaret
HiliteMenuItem
hread
hwrite
I
InflateRect
InsertMenu
InsertMenuItem
IntersectClipRect
IntersectRect
Intru
InvalidateRect
InvalidateRgn
InvertRect
InvertRgn
IsChild
IsIconic
IsMenu
IsRectEmpty
IsValidCodePage
IsValidLocale
IsWindow
IsWindowEnabled
IsWindowUnicode
IsWindowVisible
IsZoomed
K
KERNINGPAIR
keybd_event
L
LARGE_INTEGER
lclose
lcreat
LineDDA
LineTo
llseek
LoadBitmap
LoadCursor
LoadCursorFromFile
LoadIcon
LoadImage
LoadKeyboardLayout
LoadLibrary
LoadLibraryEx
LoadMenu
LoadMenuIndirect
LoadModule
LockFile
LockFileEx
LockWindowUpdate
LOGBRUSH
LOGPEN
lopen
LPtoDP
lread
lwrite
LZClose
LZCopy
LZInit
LZOpenFile
LZRead
LZSeek
M
MapViewOfFile
MapVirtualKey
MapVirtualKeyEx
MapWindowPoints
MaskBlt
menu1
menu2
menu3
MenuItemFromPoint
MENUITEMINFO
MessageBeep
ModifyMenu
ModifyWorldTransform
MONINTOR_INFO_2
mouse_event
MoveFile
MoveToEx
MoveWindow
MsgWaitForMultipleObjects
NETRESOURCE
O
OemKeyScan
OemToChar
OffsetClipRgn
OffsetRect
OffsetRgn
OffsetViewportOrgEx
OffsetWindowOrgEx
OFSTRUCT
OpenFile
OpenFileMapping
OpenIcon
OpenPrinter
OSVERSIONINFO
P
PaintDesktop
PaintRgn
PALETTEENTRY
PatBlt
PathToRegion
Pie
PlayEnhMetaFile
PlayEnhMetaFileRecord
PlayMetaFile
PlayMetaFileRecord
PlgBlt
plot1
plot2
plot3
plot4
plot5
plot6
plot7
POINTAPI
PolyBezier
PolyDraw
Polygon
Polyline
PolyPolygon
PolyPolyline
POLYTEXT
PolyTextOut
PostMessage
PostThreadMessage
print1
print2
print3
print4
print5
PRINTER_DEFAULTS
PrinterMessageBox
PrinterProperties
PROVIDOR_INFO_1
PtInRect
PtInRegion
PtVisible
Q
QueryDosDevice
R
ReadFile
ReadFileEx
ReadPrinter
RECT
Rectangle
RectInRegion
RectVisible
RedrawWindow
RegCloseKey
RegConnectRegistry
RegCreateKey
RegCreateKeyEx
RegDeleteKey
RegDeleteValue
RegEnumKey
RegEnumKeyEx
RegEnumValue
RegFlushKey
RegGetKeySecurity
RegisterWindowMessage
RegLoadKey
RegNotifyChangeKeyValue
RegOpenKey
RegOpenKeyEx
RegQueryInfoKey
RegQueryValue
RegQueryValueEx
RegReplaceKey
RegRestoreKey
RegSaveKey
RegSetKeySecurity
RegSetValue
RegSetValueEx
RegUnLoadKey
ReleaseCapture
ReleaseDC
RemoveDirectory
RemoveFontResource
RemoveMenu
ReplyMessage
ResetDC
ResetPrinter
RestoreDC
RGNDATA
RoundRect
S
sample
SaveDC
ScaleViewportExtEx
ScaleWindowExtEx
ScheduleJob
ScreenToClient
ScrollDC
ScrollWindow
ScrollWindowEx
SearchPath
SelectClipPath
SelectClipRgn
SelectObject
SendMessage
SendMessageCallback
SendMessageTimeout
SendNotifyMessage
SetAbortProc
SetActiveWindow
SetArcDirection
SetBitmapBits
SetBitmapDimensionEx
SetBkColor
SetBkMode
SetBoundsRect
SetBrushOrgEx
SetCapture
SetCaretBlinkTime
SetCaretPos
SetClassLong
SetClassWord
SetComputerName
SetCurrentDirectory
SetCursor
SetCursorPos
SetDIBColorTable
SetDIBits
SetDIBitsToDevice
SetDoubleClickTime
SetEndOfFile
SetEnhMetaFileBits
SetEnvironmentVariable
SetFileAttributes
SetFilePointer
SetFileTime
SetFocusAPI
SetForegroundWindow
SetForm
SetGraphicsMode
SetHandleCount
SetJob
SetKeyboardState
SetLocaleInfo
SetLocalTime
SetMapMode
SetMapperFlags
SetMenu
SetMenuContextHelpId
SetMenuDefaultItem
SetMenuItemBitmaps
SetMenuItemInfo
SetMetaFileBitsEx
SetMiterLimit
SetParent
SetPixel
SetPixelV
SetPolyFillMode
SetPrinter
SetPrinterData
SetPriorityClass
SetProcessShutdownParameters
SetProcessWorkingSetSize
SetRect
SetRectEmpty
SetRectRgn
SetROP2
SetStretchBltMode
SetSysColors
SetSystemCursor
SetSystemTime
SetSystemTimeAdjustment
SetTextAlign
SetTextCharacterExtra
SetTextColor
SetTextJustification
SetThreadLocale
SetThreadPriority
SetTimeZoneInformation
SetViewportExtEx
SetViewportOrgEx
SetVolumeLabel
SetWindowContextHelpId
SetWindowExtEx
SetWindowLong
SetWindowOrgEx
SetWindowPlacement
SetWindowPos
SetWindowRgn
SetWindowText
SetWindowWord
SetWinMetaFileBits
SetWorldTransform
ShellExecute
ShowCaret
ShowCursor
ShowOwnedPopups
ShowWindow
ShowWindowAsync
StartDoc
StartDocPrinter
StartPage
StartPagePrinter
StretchBlt
StretchDIBits
StrokeAndFillPath
StrokePath
SubtractRect
SwapMouseButton
SYSTEM_INFO
SystemParametersInfo
SYSTEMTIME
SystemTimeToFileTime
SystemTimeToTzSpecificLocalTime
T
TabbedTextOut
TerminateProcess
TextOut
TileWindows
TIME_ZONE_INFORMATION
ToAscii
ToUnicode
TPMPARAMS
TrackPopupMenu
TrackPopupMenuEx
txt_fon1
txt_fon2
txt_fon3
types
U
uAction
UnionRect
UnloadKeyboardLayout
UnlockFile
UnlockFileEx
UnmapViewOfFile
UnrealizeObject
UpdateWindow
V
ValidateRect
ValidateRgn
Vb&PDF
VerFindFile
VerInstallFile
VerInstallFile_Table
VerLanguageName
VerQueryValue
VkKeyScan
W
WidenPath
Win_msg1
WindowFromDC
WindowFromPoint
WINDOWPLACEMENT
WinExec
WNetAddConnection
WNetAddConnection2
WNetAddConnection3
WNetCancelConnection
WNetCancelConnection2
WNetCloseEnum
WNetConnectionDialog
WNetDisconnectDialog
WNetEnumResource
WNetGetConnection
WNetGetLastError
WNetGetUniversalName
WNetGetUser
WNetOpenEnum
WriteFile
WriteFileEx
WritePrinter
WritePrivateProfileSection
WritePrivateProfileString
WriteProfileSection
WriteProfileString
X
XFORM




以SetWindowText函数调用为例子:
SetWindowText
VB声明
Declare Function SetWindowText Lib "user32" Alias    "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
说明
设置窗口的标题文字或控件的内容(在vb里使用:针对vb窗体,应使用caption或text属性)
返回值
Long,非零表示成功,零表示失败。会设置GetLastError
参数表
参数类型及说明
hwndLong,要设置文字的窗口的句柄
lpStringString,要设到hwnd窗口中的文字


(defun c:setmycadtitle (/ app acadver wrap hwnd filename str hico)
  (vl-load-com)
  (setq app (vlax-get-acad-object))                                               ;CAD程序对象
  (setq acadver (atof (getvar "acadver")))                                     ;获取当前cad版本
  (setq wrap (vlax-create-object "DynamicWrapperX"))                 ;创建DynamicWrapperX对象
  (setq hwnd (vla-get-hwnd app))                                                  ;当前文档句柄
  (cond
    ((= acadver 16.0)(setq str "xxxx For AutoCAD 2004"))
    ((= acadver 16.1)(setq str "xxxx For AutoCAD 2005"))
    ((= acadver 16.2)(setq str "xxxx For AutoCAD 2006"))
    ((= acadver 17.0)(setq str "xxxxFor AutoCAD 2007"))
    ((= acadver 17.1)(setq str "xxxx For AutoCAD 2008"))
    ((= acadver 17.2)(setq str "xxxx For AutoCAD 2009"))
    ((= acadver 18.0)(setq str "xxxx For AutoCAD 2010"))
  )
  (setq filename "mykey.ico")
  (vlax-invoke wrap 'Register "USER32" "SetWindowText" "i=ls" "r=l") ;注册SetWindowText函数
  (vlax-invoke wrap 'SetWindowText hwnd str)                           ;重设CAD程序标题窗口文字内容
  (vlax-release-object wrap)
  (princ)
)








"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2022-3-5 09:08 | 显示全部楼层
这个可以,收藏一下
发表于 2022-3-1 19:35 | 显示全部楼层
易语言也是调用这些API
发表于 2022-3-1 16:00 | 显示全部楼层
谢谢楼主分享,做个记号,备用。
发表于 2022-2-27 21:24 | 显示全部楼层
感谢整理分享,学习学习!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-25 21:07 , Processed in 0.397367 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表