优秀的编程知识分享平台

网站首页 > 技术文章 正文

Office API声明语句学习之二十三(microsoft office api)

nanyue 2024-07-29 01:11:50 技术文章 9 ℃

跟我学VBA,我这里专注VBA, 授人以渔。

这讲我们学习Office API声明语句学习之二十三。希望对大家有所帮助。

· 如何学习VBA呢? 概括的说就是: 学习过程中要信、解、受、持,更要有回向的业力。无论您在学习的任何阶段,都要对照教程的知识点加持自己的实际工作,总会有丰厚的收获。

· 教程学习顺序是7,1(或4),3,2,6,5。第7套《VBA之Excel应用》是对VBA基本的讲解;第1(或4)套《VBA代码解决方案》是《VBA之Excel应用》的提高;第3套《VBA数组与字典解决方案》是VBA应用的专题讲解,教程中讲解的专题是数组和字典,大家会在这套教程中看到非常全面的数组与字典的应用;第2套《VBA数据库解决方案》也是VBA应用的专题讲解,教程讲解的专题是数据库,大家会在这套教程中看到VBA连接Excel与accdb的全面应用;第6套《VBA信息获取与处理》是整个VBA应用的提高;第5套《VBA中类的解读及应用》是VBA的最高理论"类""接口技术"的讲解。


Declare PtrSafe Function CreatePolyPolygonRgn Lib "gdi32" Alias "CreatePolyPolygonRgn" (lpPoint As POINTAPI, lpPolyCounts As Long, ByVal nCount As Long, ByVal nPolyFillMode As Long) As LongPtr

Declare PtrSafe Function CreatePatternBrush Lib "gdi32" Alias "CreatePatternBrush" (ByVal hBitmap As LongPtr) As LongPtr

Declare PtrSafe Function CreateRoundRectRgn Lib "gdi32" Alias "CreateRoundRectRgn" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As LongPtr

Declare PtrSafe Function CreateScalableFontResource Lib "gdi32" Alias "CreateScalableFontResourceA" (ByVal fHidden As Long, ByVal lpszResourceFile As String, ByVal lpszFontFile As String, ByVal lpszCurrentPath As String) As Long

Declare PtrSafe Function CreateSolidBrush Lib "gdi32" Alias "CreateSolidBrush" (ByVal crColor As Long) As LongPtr


Declare PtrSafe Function DeleteDC Lib "gdi32" Alias "DeleteDC" (ByVal hdc As LongPtr) As Long

Declare PtrSafe Function DeleteObject Lib "gdi32" Alias "DeleteObject" (ByVal hObject As LongPtr) As Long

Declare PtrSafe Function DeleteMetaFile Lib "gdi32" Alias "DeleteMetaFile" (ByVal hMF As LongPtr) As Long


' mode selections for the device mode function

Const DM_UPDATE = 1

Const DM_COPY = 2

Const DM_PROMPT = 4

Const DM_MODIFY = 8


Const DM_IN_BUFFER = DM_MODIFY

Const DM_IN_PROMPT = DM_PROMPT

Const DM_OUT_BUFFER = DM_COPY

Const DM_OUT_DEFAULT = DM_UPDATE


' device capabilities indices

Const DC_FIELDS = 1

Const DC_PAPERS = 2

Const DC_PAPERSIZE = 3

Const DC_MINEXTENT = 4

Const DC_MAXEXTENT = 5

Const DC_BINS = 6

Const DC_DUPLEX = 7

Const DC_SIZE = 8

Const DC_EXTRA = 9

Const DC_VERSION = 10

Const DC_DRIVER = 11

Const DC_BINNAMES = 12

Const DC_ENUMRESOLUTIONS = 13

Const DC_FILEDEPENDENCIES = 14

Const DC_TRUETYPE = 15

Const DC_PAPERNAMES = 16

Const DC_ORIENTATION = 17

Const DC_COPIES = 18


' bit fields of the return value (DWORD) for DC_TRUETYPE

Const DCTT_BITMAP = &H1&

Const DCTT_DOWNLOAD = &H2&

Const DCTT_SUBDEV = &H4&


Declare PtrSafe Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, ByVal lpPort As String, ByVal iIndex As Long, ByVal lpOutput As String, lpDevMode As DEVMODE) As Long


Declare PtrSafe Function Ellipse Lib "gdi32" Alias "Ellipse" (ByVal hdc As LongPtr, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long


Declare PtrSafe Function EqualRgn Lib "gdi32" Alias "EqualRgn" (ByVal hSrcRgn1 As LongPtr, ByVal hSrcRgn2 As LongPtr) As Long

Declare PtrSafe Function Escape Lib "gdi32" Alias "Escape" (ByVal hdc As LongPtr, ByVal nEscape As Long, ByVal nCount As Long, ByVal lpInData As String, lpOutData As Any) As Long

Declare PtrSafe Function ExtEscape Lib "gdi32" Alias "ExtEscape" (ByVal hdc As LongPtr, ByVal nEscape As Long, ByVal cbInput As Long, ByVal lpszInData As String, ByVal cbOutput As Long, ByVal lpszOutData As String) As Long

Declare PtrSafe Function DrawEscape Lib "gdi32" Alias "DrawEscape" (ByVal hdc As LongPtr, ByVal nEscape As Long, ByVal cbInput As Long, ByVal lpszInData As String) As Long

Declare PtrSafe Function ExcludeClipRect Lib "gdi32" Alias "ExcludeClipRect" (ByVal hdc As LongPtr, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

Declare PtrSafe Function ExtCreateRegion Lib "gdi32" Alias "ExtCreateRegion" (lpXform As XFORM, ByVal nCount As Long, lpRgnData As RGNDATA) As LongPtr

Declare PtrSafe Function ExtFloodFill Lib "gdi32" Alias "ExtFloodFill" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal crColor As Long, ByVal wFillType As Long) As Long

Declare PtrSafe Function FillRgn Lib "gdi32" Alias "FillRgn" (ByVal hdc As LongPtr, ByVal hRgn As LongPtr, ByVal hBrush As LongPtr) As Long

Declare PtrSafe Function FrameRgn Lib "gdi32" Alias "FrameRgn" (ByVal hdc As LongPtr, ByVal hRgn As LongPtr, ByVal hBrush As LongPtr, ByVal nWidth As Long, ByVal nHeight As Long) As Long

Declare PtrSafe Function FloodFill Lib "gdi32" Alias "FloodFill" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long


第1部:VBA代码解决方案

第2部:VBA数据库解决方案

第3部:VBA数组与字典解决方案

第4部:VBA代码解决方案之视频

第5部:VBA中类的解读和利用

第6部:VBA信息获取与处理

第7部:VBA之EXCEL应用

上述教程的学习顺序:7→1→3→2→6→5或者7→4→3→2→6→5。


分享成果,随喜正能量

Tags:

最近发表
标签列表