将长路径转为短路径
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
Private Function ShortPath(ByVal FileName As String) As String
Dim S As String
On Error GoTo exitFunc:
S = String(255, " ")
GetShortPathName FileName, S, 255
ShortPath = Left(S, InStr(S, Chr(0)) - 1)
exitFunc:
End Function
获取剪粘板中的图片文件的列表
Private Const CF_HDROP = 15
Private Type POINT
x As Long
y As Long
End Type
Private Type DROPFILES
pFiles As Long
pt As POINT
fNC As Long
fWide As Long
End Type
Private Declare Function GlobalSize Lib "kernel32" _
(ByVal hMem As Long) As Lon