64位Office API声明语句第119讲

跟我学VBA,我这里专注VBA, 授人以渔。我98年开始,从源码接触VBA已经20余年了,随着年龄的增长,越来越觉得有必要把这项技能传递给需要这项技术的职场人员。希望职场和数据打交道的朋友,都来学习VBA,利用VBA,起码可以提高自己的工作效率,可以有时间多陪陪父母,多陪陪家人,何乐而不为呢?我的教程一共九套,从入门开始一直讲到程序的分发,是学习利用VBA的实用教程。这份API资料是随高级教程赠送的.

这讲我们继续学习64位Office API声明语句第119讲,这些内容是MS的权威资料,看似枯燥,但对于想学习API函数的朋友是非常有用的。

eaabe50c8c122c74887a62591cd5008a.jpeg

【分享成果,随喜正能量】 人越纯粹,就越能感受到美。大江、大河、大海、大山、大自然,这些风景从来都不会受“属于谁”的污染,人人都感受到它们的美。人要看得见智慧,心智里才能生长出智慧。当人不再把自己视为“属于自己”,就可以看见更多的人间大美。。

当学员学习到高级阶段,如果引用API,这个资料可以直接查到64位写法。大多数情况下我们是将低版本的程序文件升级到高版本,这时您就不必为如下的错误提示所困扰了:

ed3d9c30c7e5fbf6365509fdd0267d0a.jpeg

Declare PtrSafe Function FixBrushOrgEx Lib "gdi32" Alias "FixBrushOrgEx" (ByVal hDC As LongPtr, ByVal n1 As Long, ByVal n2 As Long, lpPoint As POINTAPI) As Long

Declare PtrSafe Function GetBrushOrgEx Lib "gdi32" Alias "GetBrushOrgEx" (ByVal hDC As LongPtr, lpPoint As POINTAPI) As Long

Declare PtrSafe Function GetDIBColorTable Lib "gdi32" Alias "GetDIBColorTable" (ByVal hDC As LongPtr, ByVal un1 As Long, ByVal un2 As Long, pRGBQuad As RGBQUAD) As Long

Declare PtrSafe Function GetPixelFormat Lib "gdi32" Alias "GetPixelFormat" (ByVal hDC As LongPtr) As Long

Declare PtrSafe Function LineDDA Lib "gdi32" Alias "LineDDA" (ByVal n1 As Long, ByVal n2 As Long, ByVal n3 As Long, ByVal n4 As Long, ByVal lpLineDDAProc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function SetAbortProc Lib "gdi32" Alias "SetAbortProc" (ByVal hDC As LongPtr, ByVal lpAbortProc As LongPtr) As Long

Declare PtrSafe Function SetDIBColorTable Lib "gdi32" Alias "SetDIBColorTable" (ByVal hDC As LongPtr, ByVal un1 As Long, ByVal un2 As Long, pcRGBQuad As RGBQUAD) As Long

Declare PtrSafe Function SetPixelFormat Lib "gdi32" Alias "SetPixelFormat" (ByVal hDC As LongPtr, ByVal n As Long, pcPixelFormatDescriptor As PIXELFORMATDESCRIPTOR) As Long

Declare PtrSafe Function SwapBuffers Lib "gdi32" Alias "SwapBuffers" (ByVal hDC As LongPtr) As Long

Declare PtrSafe Function EnumCalendarInfo Lib "kernel32" Alias "EnumCalendarInfoA" (ByVal lpCalInfoEnumProc As LongPtr, ByVal Locale As Long, ByVal Calendar As Long, ByVal CalType As Long) As Long

Declare PtrSafe Function GetCurrencyFormat Lib "kernel32" Alias "GetCurrencyFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue As String, lpFormat As CURRENCYFMT, ByVal lpCurrencyStr As String, ByVal cchCurrency As Long) As Long

Declare PtrSafe Function GetNumberFormat Lib "kernel32" Alias "GetNumberFormatA" (ByVal Locale As Long, ByVal dwFlags As Long, ByVal lpValue As String, lpFormat As NUMBERFMT, ByVal lpNumberStr As String, ByVal cchNumber As Long) As Long

Declare PtrSafe Function GetStringTypeEx Lib "kernel32" Alias "GetStringTypeExA" (ByVal Locale As Long, ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, lpCharType As Integer) As Long

Declare PtrSafe Function GetStringTypeW Lib "kernel32" Alias "GetStringTypeW" (ByVal dwInfoType As Long, ByVal lpSrcStr As String, ByVal cchSrc As Long, lpCharType As Integer) As Long

Declare PtrSafe Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long

Declare PtrSafe Function DeletePrinter Lib "winspool.drv" Alias "DeletePrinter" (ByVal hPrinter As LongPtr) As Long

Declare PtrSafe Function FindClosePrinterChangeNotification Lib "winspool.drv" Alias "FindClosePrinterChangeNotification" (ByVal hChange As LongPtr) As Long

Declare PtrSafe Function FindFirstPrinterChangeNotification Lib "winspool.drv" Alias "FindFirstPrinterChangeNotification" (ByVal hPrinter As LongPtr, ByVal fdwFlags As Long, ByVal fdwOptions As Long, ByVal pPrinterNotifyOptions As String) As LongPtr

Declare PtrSafe Function FindNextPrinterChangeNotification Lib "winspool.drv" Alias "FindNextPrinterChangeNotification" (ByVal hChange As LongPtr, pdwChange As Long, ByVal pvReserved As String, ByVal ppPrinterNotifyInfo As LongPtr) As Long

Declare PtrSafe Function GetPrinter Lib "winspool.drv" Alias "GetPrinterA" (ByVal hPrinter As LongPtr, ByVal Level As Long, pPrinter As Any, ByVal cbBuf As Long, pcbNeeded As Long) As Long

Declare PtrSafe Function SetPrinter Lib "winspool.drv" Alias "SetPrinterA" (ByVal hPrinter As LongPtr, ByVal Level As Long, pPrinter As Byte, ByVal Command As Long) As Long

Declare PtrSafe Function BroadcastSystemMessage Lib "user32" Alias "BroadcastSystemMessage" (ByVal dw As Long, pdw As Long, ByVal un As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As LongPtr, ByVal hWnd As LongPtr, ByVal Msg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr

Declare PtrSafe Function CascadeWindows Lib "user32" Alias "CascadeWindows" (ByVal hwndParent As LongPtr, ByVal wHow As Long, lpRect As RECT, ByVal cKids As Long, lpkids As LongPtr) As Integer

Declare PtrSafe Function ChangeMenu Lib "user32" Alias "ChangeMenuA" (ByVal hMenu As LongPtr, ByVal cmd As Long, ByVal lpszNewItem As String, ByVal cmdInsert As Long, ByVal flags As Long) As Long

Declare PtrSafe Function CheckMenuRadioItem Lib "user32" Alias "CheckMenuRadioItem" (ByVal hMenu As LongPtr, ByVal un1 As Long, ByVal un2 As Long, ByVal un3 As Long, ByVal un4 As Long) As Long

Declare PtrSafe Function CloseDesktop Lib "user32" Alias "CloseDesktop" (ByVal hDesktop As LongPtr) As Long

Declare PtrSafe Function CloseWindowStation Lib "user32" Alias "CloseWindowStation" (ByVal hWinSta As LongPtr) As Long

Declare PtrSafe Function CopyImage Lib "user32" Alias "CopyImage" (ByVal handle As LongPtr, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As LongPtr

Declare PtrSafe Function CreateDesktop Lib "user32" Alias "CreateDesktopA" (ByVal lpszDesktop As String, ByVal lpszDevice As String, pDevmode As DEVMODE, ByVal dwFlags As Long, ByVal dwDesiredAccess As Long, lpsa As SECURITY_ATTRIBUTES) As LongPtr

Declare PtrSafe Function CreateDialogIndirectParam Lib "user32" Alias "CreateDialogIndirectParamA" (ByVal hInstance As LongPtr, lpTemplate As DLGTEMPLATE, ByVal hWndParent As LongPtr, ByVal lpDialogFunc As LongPtr, ByVal dwInitParam As LongPtr) As LongPtr

Declare PtrSafe Function CreateDialogParam Lib "user32" Alias "CreateDialogParamA" (ByVal hInstance As LongPtr, ByVal lpName As String, ByVal hWndParent As LongPtr, ByVal lpDialogFunc As LongPtr, ByVal lParamInit As LongPtr) As LongPtr

Declare PtrSafe Function CreateIconFromResource Lib "user32" Alias "CreateIconFromResource" (presbits As Byte, ByVal dwResSize As Long, ByVal fIcon As Long, ByVal dwVer As Long) As LongPtr

Declare PtrSafe Function DialogBoxIndirectParam Lib "user32" Alias "DialogBoxIndirectParamA" (ByVal hInstance As LongPtr, hDialogTemplate As DLGTEMPLATE, ByVal hWndParent As LongPtr, ByVal lpDialogFunc As LongPtr, ByVal dwInitParam As LongPtr) As LongPtr

Declare PtrSafe Function DragObject Lib "user32" Alias "DragObject" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal un As Long, ByVal dw As LongPtr, ByVal hCursor As LongPtr) As Long

Declare PtrSafe Function DrawAnimatedRects Lib "user32" Alias "DrawAnimatedRects" (ByVal hwnd As LongPtr, ByVal idAni As Long, lprcFrom As RECT, lprcTo As RECT) As Long

Declare PtrSafe Function DrawCaption Lib "user32" Alias "DrawCaption" (ByVal hWnd As LongPtr, ByVal hDC As LongPtr, pcRect As RECT, ByVal un As Long) As Long

Declare PtrSafe Function DrawEdge Lib "user32" Alias "DrawEdge" (ByVal hdc As LongPtr, qrc As RECT, ByVal edge As Long, ByVal grfFlags As Long) As Long

Declare PtrSafe Function DrawFrameControl Lib "user32" Alias "DrawFrameControl" (ByVal hDC As LongPtr, lpRect As RECT, ByVal un1 As Long, ByVal un2 As Long) As Long

Declare PtrSafe Function DrawIconEx Lib "user32" Alias "DrawIconEx" (ByVal hdc As LongPtr, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As LongPtr, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As LongPtr, ByVal diFlags As Long) As Long

Declare PtrSafe Function DrawState Lib "user32" Alias "DrawStateA" (ByVal hDC As LongPtr, ByVal hBrush As LongPtr, ByVal lpDrawStateProc As LongPtr, ByVal lParam As LongPtr, ByVal wParam As LongPtr, ByVal n1 As Long, ByVal n2 As Long, ByVal n3 As Long, ByVal n4 As Long, ByVal un As Long) As Long

Type DRAWTEXTPARAMS

cbSize As Long

iTabLength As Long

iLeftMargin As Long

iRightMargin As Long

uiLengthDrawn As Long

End Type

Declare PtrSafe Function DrawTextEx Lib "user32" Alias "DrawTextExA" (ByVal hDC As LongPtr, ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, lpDrawTextParams As DRAWTEXTPARAMS) As Long

Declare PtrSafe Function EnumChildWindows Lib "user32" Alias "EnumChildWindows" (ByVal hWndParent As LongPtr, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumDesktops Lib "user32" Alias "EnumDesktopsA" (ByVal hwinsta As LongPtr, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumDesktopWindows Lib "user32" Alias "EnumDesktopWindows" (ByVal hDesktop As LongPtr, ByVal lpfn As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumPropsEx Lib "user32" Alias "EnumPropsExA" (ByVal hWnd As LongPtr, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumProps Lib "user32" Alias "EnumPropsA" (ByVal hWnd As LongPtr, ByVal lpEnumFunc As LongPtr) As Long

Declare PtrSafe Function EnumThreadWindows Lib "user32" Alias "EnumThreadWindows" (ByVal dwThreadId As Long, ByVal lpfn As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumWindows Lib "user32" (ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function EnumWindowStations Lib "user32" Alias "EnumWindowStationsA" (ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long

Declare PtrSafe Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As LongPtr, ByVal hWnd2 As LongPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As LongPtr

Declare PtrSafe Function GetKeyboardLayoutList Lib "user32" Alias "GetKeyboardLayoutList" (ByVal nBuff As Long, lpList As LongPtr) As Long

Declare PtrSafe Function GetKeyboardLayout Lib "user32" Alias "GetKeyboardLayout" (ByVal dwLayout As Long) As LongPtr

Declare PtrSafe Function GetMenuContextHelpId Lib "user32" Alias "GetMenuContextHelpId" (ByVal hMenu As LongPtr) As Long

Declare PtrSafe Function GetMenuDefaultItem Lib "user32" Alias "GetMenuDefaultItem" (ByVal hMenu As LongPtr, ByVal fByPos As Long, ByVal gmdiFlags As Long) As Long

Type MENUITEMINFO

cbSize As Long

fMask As Long

fType As Long

fState As Long

wID As Long

hSubMenu As LongPtr

hbmpChecked As LongPtr

hbmpUnchecked As LongPtr

dwItemData As LongPtr

dwTypeData As String

cch As Long

'#if(WINVER >= 0x0500)

hbmpItem As LongPtr

'#endif /* WINVER >= 0x0500 */

End Type

4df1f722372a2713d972dd76907921e7.jpeg

我20多年的VBA实践经验,全部浓缩在下面的各个教程中:

8f0316b560f8afc8c839a933c16070c3.jpeg


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/676318.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

我们如何管理网站权限?这么操作最简单

网站权限有哪些 在知道如何管理网站权限之前我们先来了解一下网站权限都有哪些。在日常我们使用浏览器的时候网站都会使用你同意的某些权限进行一些操作,下面是总结的一些网站权限: 位置访问权限:控制网站是否可以访问你的地理位置数据。 …

【MATLAB源码-第220期】基于matlab的Massive-MIMO误码率随着接收天线变化仿真采用ZF均衡和QPSK调制。

操作环境: MATLAB 2022a 1、算法描述 1. 系统背景与目标 无线通信系统的发展极大地推动了现代通信技术的进步,从移动通信到无线局域网,甚至是物联网,均依赖于无线通信系统的高效和可靠性。在无线通信系统中,核心目…

详解和实现数据表格中的行数据合并功能

theme: smartblue 前言 需求场景: 在提供了数据查看和修改的表格视图中(如table、a-table等…),允许用户自行选择多行数据,依据当前状态进行特定列数据的合并操作。选中的数据将统一显示为选中组的首条数据值。同时,页面会即时反…

k8s怎么监听资源的变更

监听k8s所有的 Deployment 资源 package mainimport ("context""fmt"v1 "k8s.io/api/apps/v1""k8s.io/apimachinery/pkg/util/json""k8s.io/client-go/informers""k8s.io/client-go/kubernetes""k8s.io/cli…

linux,lseek,append用法

打开写的.c文件 内容为 代码 <sys/stat.h> #include <fcntl.h> #include<stdio.h> #include<unistd.h> #include<string.h>//off_t lseek(int fd, off_t offset, int whence); //int open(const char *pathname, int flags); //int open(const …

一个AI板卡电脑--香橙派 AIpro

本文算是一个开箱测评&#xff0c;主要评估它和一个电脑的距离。 香橙派官网&#xff1a;香橙派(Orange Pi)-Orange Pi官网-香橙派开发板,开源硬件,开源软件,开源芯片,电脑键盘香橙派&#xff08;Orange Pi&#xff09;是深圳市迅龙软件有限公司旗下开源产品品牌;香橙派&#x…

【触想智能】工业平板电脑在高铁上的应用分析

随着科技的快速发展&#xff0c;平板电脑作为一种新型的电子设备&#xff0c;已经逐渐成为人们日常生活中的必需品。而工业平板电脑则是一种更为专业的平板电脑&#xff0c;可以应用于各种工业领域&#xff0c;如交通、制造业、医疗、金融、人工智能等。 今天&#xff0c;小编为…

Oracle Hint /*+APPEND*/插入性能总结

oracle append用法 Oracle中的APPEND用法主要用于提高数据插入的效率。 基本用法&#xff1a;在使用了APPEND选项后&#xff0c;插入数据会直接加到表的最后面&#xff0c;而不会在表的空闲块中插入数据。这种做法不需要寻找freelist中的free block&#xff0c;从而避免了在…

推荐一个图片识别的llama3微调版本 清华面壁项目

水一篇&#xff1a; MiniCPM-V是面向图文理解的端侧多模态大模型系列。该系列模型接受图像和文本输入&#xff0c;并提供高质量的文本输出。自2024年2月以来&#xff0c;我们共发布了4个版本模型&#xff0c;旨在实现领先的性能和高效的部署&#xff0c;目前该系列最值得关注的…

36【Aseprite 作图】蒸笼盖——拆解

1 蒸笼盖框架 里圈和外圈的形状都是一样的 扶手处&#xff0c;2 1 2 2 2&#xff08;最好都是2&#xff0c;拐角处用1&#xff09; 2 上色 中间的波浪&#xff0c;是2 2 2 上&#xff08;再 2 2 2 下&#xff09; 下方阴影&#xff0c;左边的阴影&#xff0c;右边的阴影颜色…

【Elasticsearch】es基础入门-02.RestClient操作索引库

RestClient操作索引库 示例&#xff1a; 一.分析数据结构&#xff0c;写索引库 #酒店的mapper PUT /hotel {"mappings": {"properties": {"id":{"type": "keyword"},"name":{"type": "text",…

p5开发helloworld

注意&#xff0c;执行的时候&#xff0c;后面不用带class的后缀

速递FineWeb:一个拥有无限潜力的15T Tokens的开源数据集

大模型技术论文不断&#xff0c;每个月总会新增上千篇。本专栏精选论文重点解读&#xff0c;主题还是围绕着行业实践和工程量产。若在某个环节出现卡点&#xff0c;可以回到大模型必备腔调或者LLM背后的基础模型新阅读。而最新科技&#xff08;Mamba,xLSTM,KAN&#xff09;则提…

SuperMap GIS基础产品FAQ集锦(20240603)

一、SuperMap iDesktopX 问题1&#xff1a;请教一下&#xff0c;桌面把火星坐标系的数据投影转换为4326坐标系数据如何才能没有偏移呢&#xff1f; 11.1.1 【解决办法】可以使用iDesktopX提供的“电子地图坐标转换”插件实现对火星坐标系数据的纠偏。 问题2&#xff1a;请教…

基于鲲鹏服务器搭建简单的开源论坛系统(LAMP)实践分享

LAMPLinux apache mysql( mariadb) PHP 结合利用华为云弹性负载均衡ELB弹性伸缩AS服务 优点&#xff1a; 将访问流量自动分发到多台云服务器&#xff0c;扩展应用系统对外的服务能力&#xff0c;实现更高水平的应用容错&#xff1b; 根据不同的业务、访问需求和预设策略&…

Kafka之Consumer原理

1. Kafka消息消费流程 kafka的消费流程&#xff0c;首先是producer生产消息经过处理后放入到Broker服务器中&#xff0c;然后进入到内存中&#xff0c;内存再进行刷盘到磁盘中&#xff0c;kafak提供了两种刷盘策略&#xff0c;同步刷盘(flush.message 一次IO刷盘多少消息)和异…

PTA字符串删除

已知del_str为字符串str中要删除的子串&#xff0c;请结合所学字符串操作实现在str中删除所有del_str子串&#xff0c;并统计del_str在str中出现的次数。 输入格式: 123dufvdfv123dfljvb 123 输出格式: dufvdfvdfljvb #include<stdio.h> #include<string.h> in…

SSM物流管理系统的设计与实现-计算机毕业设计源码44323

摘 要 科技进步的飞速发展引起人们日常生活的巨大变化&#xff0c;电子信息技术的飞速发展使得电子信息技术的各个领域的应用水平得到普及和应用。信息时代的到来已成为不可阻挡的时尚潮流&#xff0c;人类发展的历史正进入一个新时代。在现实运用中&#xff0c;应用软件的工作…

Java编程常见问题汇总一

系列文章目录 文章目录 系列文章目录前言一、字符串连接误用二、错误的使用StringBuffer三、测试字符串相等性四、数字转换成字符串五、利用不可变对象(Immutable) 前言 前些天发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分…

企业数字化转型的测度难题:基于大语言模型的新方法与新发现

《经济研究》新文章《企业数字化转型的测度难题&#xff1a;基于大语言模型的新方法与新发现》运用机器学习和大语言模型构造一套新的企业数字化转型指标。理论分析和数据交叉验证均表明&#xff0c;构建的指标相对已有方法更准确&#xff1a; 1.第一步&#xff1a;选择“管理…