64位Office API声明语句第120讲

news2024/12/25 22:24:57

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

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

8c460d4f779e1bb47229b34c57e5c812.jpeg

【分享成果,随喜正能量】 会因为有情绪而烦闷,也因为没控制情绪而懊悔。莫道幽人一事无,闲中尽有静工夫。情绪就像水,宜疏不宜堵。学会控制情绪,不能把情绪看得过重,也不能一味遏制情绪的产生。倾听所有声音,尊重所有声音,但只成为自己!不被情绪支配,才是高级自由!。

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

e3a547b500eda17b29c017ad24c0fb8f.jpeg

Declare PtrSafe Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (ByVal hMenu As LongPtr, ByVal un As Long, ByVal b As Long, lpMenuItemInfo As MENUITEMINFO) As Long

Declare PtrSafe Function GetMenuItemRect Lib "user32" Alias "GetMenuItemRect" (ByVal hWnd As LongPtr, ByVal hMenu As LongPtr, ByVal uItem As Long, lprcItem As RECT) As Long

Type SCROLLINFO

cbSize As Long

fMask As Long

nMin As Long

nMax As Long

nPage As Long

nPos As Long

nTrackPos As Long

End Type

Declare PtrSafe Function GetScrollInfo Lib "user32" Alias "GetScrollInfo" (ByVal hWnd As LongPtr, ByVal n As Long, lpScrollInfo As SCROLLINFO) As Long

Declare PtrSafe Function GetSysColorBrush Lib "user32" Alias "GetSysColorBrush" (ByVal nIndex As Long) As LongPtr

Declare PtrSafe Function GetUserObjectInformation Lib "user32" Alias "GetUserObjectInformationA" (ByVal hObj As LongPtr, ByVal nIndex As Long, pvInfo As Any, ByVal nLength As Long, lpnLengthNeeded As Long) As Long

Declare PtrSafe Function GetWindowContextHelpId Lib "user32" Alias "GetWindowContextHelpId" (ByVal hWnd As LongPtr) As Long

Declare PtrSafe Function GetWindowRgn Lib "user32" Alias "GetWindowRgn" (ByVal hWnd As LongPtr, ByVal hRgn As LongPtr) As Long

Declare PtrSafe Function GrayString Lib "user32" Alias "GrayStringA" (ByVal hDC As LongPtr, ByVal hBrush As LongPtr, ByVal lpOutputFunc As LongPtr, ByVal lpData As LongPtr, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long

Declare PtrSafe Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (ByVal hMenu As LongPtr, ByVal un As Long, ByVal bool As Long, ByRef lpcMenuItemInfo As MENUITEMINFO) As Long

Declare PtrSafe Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As LongPtr

Declare PtrSafe Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As LongPtr, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As LongPtr

Declare PtrSafe Function LookupIconIdFromDirectoryEx Lib "user32" Alias "LookupIconIdFromDirectoryEx" (presbits As Byte, ByVal fIcon As Long, ByVal cxDesired As Long, ByVal cyDesired As Long, ByVal Flags As Long) As Long

Declare PtrSafe Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExA" (ByVal uCode As Long, ByVal uMapType As Long, ByVal dwhkl As LongPtr) As Long

Type MSGBOXPARAMS

cbSize As Long

hwndOwner As LongPtr

hInstance As LongPtr

lpszText As String

lpszCaption As String

dwStyle As Long

lpszIcon As String

dwContextHelpId As LongPtr

lpfnMsgBoxCallback As LongPtr

dwLanguageId As Long

End Type

Declare PtrSafe Function MessageBoxIndirect Lib "user32" Alias "MessageBoxIndirectA" (lpMsgBoxParams As MSGBOXPARAMS) As Long

Declare PtrSafe Function OpenDesktop Lib "user32" Alias "OpenDesktopA" (ByVal lpszDesktop As String, ByVal dwFlags As Long, ByVal fInherit As Long, ByVal dwDesiredAccess As Long) As LongPtr

Declare PtrSafe Function OpenInputDesktop Lib "user32" Alias "OpenInputDesktop" (ByVal dwFlags As Long, ByVal fInherit As Long, ByVal dwDesiredAccess As Long) As LongPtr

Declare PtrSafe Function OpenWindowStation Lib "user32" Alias "OpenWindowStationA" (ByVal lpszWinSta As String, ByVal fInherit As Long, ByVal dwDesiredAccess As Long) As LongPtr

Declare PtrSafe Function PaintDesktop Lib "user32" Alias "PaintDesktop" (ByVal hdc As LongPtr) As Long

Type WNDCLASSEX

cbSize As Long

style As Long

lpfnWndProc As LongPtr

cbClsExtra As Long

cbWndExtra As Long

hInstance As LongPtr

hIcon As LongPtr

hCursor As LongPtr

hbrBackground As LongPtr

lpszMenuName As String

lpszClassName As String

hIconSm As LongPtr

End Type

Declare PtrSafe Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (pcWndClassEx As WNDCLASSEX) As Integer

Declare PtrSafe Function SetMenuContextHelpId Lib "user32" Alias "SetMenuContextHelpId" (ByVal hMenu As LongPtr, ByVal dw As Long) As Long

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

Declare PtrSafe Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (ByVal hMenu As LongPtr, ByVal un As Long, ByVal bool As Long, lpcMenuItemInfo As MENUITEMINFO) As Long

Declare PtrSafe Function SetMessageExtraInfo Lib "user32" Alias "SetMessageExtraInfo" (ByVal lParam As LongPtr) As LongPtr

Declare PtrSafe Function SetMessageQueue Lib "user32" Alias "SetMessageQueue" (ByVal cMessagesMax As Long) As Long

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

Declare PtrSafe Function SetScrollInfo Lib "user32" Alias "SetScrollInfo" (ByVal hWnd As LongPtr, ByVal n As Long, lpcScrollInfo As SCROLLINFO, ByVal bool As Long) As Long

Declare PtrSafe Function SetSystemCursor Lib "user32" Alias "SetSystemCursor" (ByVal hcur As LongPtr, ByVal id As Long) As Long

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

Declare PtrSafe Function SetTimer Lib "user32" Alias "SetTimer" (ByVal hWnd As LongPtr, ByVal nIDEvent As LongPtr, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPtr

Declare PtrSafe Function SetUserObjectInformation Lib "user32" Alias "SetUserObjectInformationA" (ByVal hObj As LongPtr, ByVal nIndex As Long, pvInfo As Any, ByVal nLength As Long) As Long

Declare PtrSafe Function SetWindowContextHelpId Lib "user32" Alias "SetWindowContextHelpId" (ByVal hWnd As LongPtr, ByVal dw As Long) As Long

Declare PtrSafe Function SetWindowRgn Lib "user32" Alias "SetWindowRgn" (ByVal hWnd As LongPtr, ByVal hRgn As LongPtr, ByVal bRedraw As Long) As Long

Declare PtrSafe Function SetWindowsHook Lib "user32" Alias "SetWindowsHookA" (ByVal nFilterType As Long, ByVal pfnFilterProc As LongPtr) As LongPtr

Declare PtrSafe Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As LongPtr, ByVal hmod As LongPtr, ByVal dwThreadId As Long) As LongPtr

Declare PtrSafe Function ShowWindowAsync Lib "user32" Alias "ShowWindowAsync" (ByVal hWnd As LongPtr, ByVal nCmdShow As Long) As Long

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

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

Declare PtrSafe Function ToAsciiEx Lib "user32" Alias "ToAsciiEx" (ByVal uVirtKey As Long, ByVal uScanCode As Long, lpKeyState As Byte, lpChar As Integer, ByVal uFlags As Long, ByVal dwhkl As LongPtr) As Long

Type TPMPARAMS

cbSize As Long

rcExclude As RECT

End Type

7370196c35bb294bf8308fa94a2cf236.jpeg

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

312c345d79c0e9c33413483e985ac7eb.jpeg


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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

JVM原理(十二):JVM虚拟机类加载过程

一个类型从被加载到虚拟机内存中开始,到卸载为止,它的整个生命周期将会经过 加载、验证、准备、解析、初始化、使用、卸载七个阶段。其中 验证、准备、解析三个部分统称为 连接 1. 加载 加载是整个类加载的一个过程。在加载阶段,Java虚拟机…

第25篇 滑动开关控制LED<三>

Q:如何创建流水灯汇编语言程序工程并运行呢? A:基本原理:与用单个SW控制单个对应LED点亮与熄灭一样,我们创建用SW控制流水灯状态。默认初始状态为4个连续的红色LED为一组(每组之间隔4个熄灭的LED&#xff…

如何在网络抓取过程中绕过 CAPTCHA 和 reCAPTCHA?

什么是 CAPTCHA? CAPTCHA,全称为 “Completely Automated Public Turing test to tell Computers and Humans Apart”(完全自动化的公共图灵测试以区分计算机和人类),是一种用于识别网站访问者是否为真实人的测试。 这…

绝区零国际服怎么下载 绝区零国际服下载教程

绝区零即将上线,每位玩家都能在这里开启全新的时空冒险之旅,主要玩法分为以剧情和副本为主的核心玩法、以刷材料为主的养成副本,以及日常任务为主,在以往的手游中,玩家进入某项玩法只需要从游戏界面调取菜单即可&#…

Django 一对一关系

作用: 两个数据库表建立外键关系当外键表的数据被删除时,主表的数据也会一并删除。 1,添加表模型 Test/app8/views.pyfrom django.db import modelsclass User(models.Model):username models.CharField(max_length50, uniqueTrue)email …

程序员AI提效案例:统计B站课程耗时情况

文章目录 一,时长统计需求二,一波三折三,终极方案 AIJava总结 今天为了写一篇博客,这篇博客介绍了B站的一个Java项目,这个项目分为三个阶段: 初级篇高级篇运维篇 一,时长统计需求 我想根据每个…

软件测试中安全测试包含内容及安全测试怎么测

一、软件测试安全测试包含哪些 1. 漏洞扫描 漏洞扫描是软件测试安全测试的基础,它用于检测应用程序和系统中存在的已知漏洞。安全测试工具如AppScan、OWASP ZAP和Nessus等可以对应用程序进行自动化扫描,发现可能存在的漏洞,如跨站点脚本&am…

大象机器人开源协作机械臂机械臂接入GPT4o大模型!

本文已经或者同济子豪兄作者授权对文章进行编辑和转载 引言 随着人工智能和机器人技术的快速发展,机械臂在工业、医疗和服务业等领域的应用越来越广泛。通过结合大模型和多模态AI,机械臂能够实现更加复杂和智能化的任务,提升了人机协作的效率…

CTO透露GPT-5内幕,OpenAI 以36亿美元收购数据库初创公司

目录 01 GPT-5 02 OpenAI收购Rockset 2.1 谁是Rockset? 2.2 OpenAI的目的是什么? 01 GPT-5 虽然GPT-4的视频通话功能尚未全面推广,但OpenAI的CTO已经对即将到来的GPT-5给出了新的暗示。 不久前,Mira回到母校达特茅斯工程学…

jdk动态代理-基于反射的动态代理

JDK动态代理的示例图,下图的绿色箭头表示实现的关系,白色虚线表示依赖关系,target表示被ProxyFactory的target成员表示代理类对象,由ProxyFactory传入的Object参数初始化,接着调用getProxyInstance函数利用反射来返回代…

DMA学习笔记

参考文章 https://blog.csdn.net/as480133937/article/details/104927922 DMA简介 DMA,全称Direct Memory Access,即直接存储器访问。DMAC 即 DMA 控制器,提供了一种硬件的数据传输方式,无需 CPU 的介入,可以处理外…

LangGraph进阶:手把手教你打造电影脚本AI

LangGraph是著名的大模型开发框架LangChain推出的用于构建基于复杂工作流的LLM应用的开发库。LangGraph把任务的节点与关系用Graph结构来定义以支持更多样更复杂的应用场景,特别是: 实现包含循环、迭代等复杂工作流的高级RAG范式 需要更灵活控制的Agent…

QAM MMA

MMA是改进的CMA,有RCA和CMA的优点,还能对相位误差进行修正。 N 5e5; % 仿真符号数 M 16; % QAM16msg randi([0 M-1],N,1); % 产生随机符号 tx qammod(msg,M); % QAM调制test_snr 20:5:30; …

采用Java语言+开发工具 Idea+ scode数字化产科管理平台源码,产科管理新模式

采用Java语言开发工具 Idea scode数字化产科管理平台源码,产科管理新模式 数字化产科管理系统是现代医疗信息化建设的重要组成部分,它利用现代信息技术手段,对孕产妇的孕期管理、分娩过程及产后康复等各个环节进行数字化、智能化管理&#xf…

【总线】AXI4第七课时:AXI的额外的控制信息(PROT和CACHE)

大家好,欢迎来到今天的总线学习时间!如果你对电子设计、特别是FPGA和SoC设计感兴趣,那你绝对不能错过我们今天的主角——AXI4总线。作为ARM公司AMBA总线家族中的佼佼者,AXI4以其高性能和高度可扩展性,成为了现代电子系统中不可或缺的通信桥梁…

安乃达挂牌上交所:营收放缓净利润下滑,业绩风险如何规避?

《港湾商业观察》施子夫 7月3日,冲刺上交所主板刚满2年的安乃达驱动技术(上海)股份有限公司(以下简称安乃达,603350.SH)将正式挂牌上市。 据悉,此次安乃达公开发行数量为2900万股,…

【雷丰阳-谷粒商城 】【分布式高级篇-微服务架构篇】【18】认证服务02—微博社交登录

持续学习&持续更新中… 守破离 【雷丰阳-谷粒商城 】【分布式高级篇-微服务架构篇】【18】认证服务02—微博社交登录 微博社交登录图示原理前置准备实现流程完整代码 参考 微博社交登录 OAuth: OAuth(开放授权)是一个开放标准&#xff0…

Python-Tkinter+Logging+Sqlserver项目结合

参考文章: https://www.jb51.net/article/283745.htm 目录: common(文件夹) – base.py – config_reader.py – dosqlserver.py – log.py txt(空文件夹,后面会自动生成txt文件在该文件夹下面) 1.txt 2.txt env.…

html+js+css美观好看的动态404界面

中间的那一段话(root开头的那一句)是逐字输出的 那段话显示完后,自动显示超大号字体404 来都来了点个赞,关注一下呗😄,本人发誓:你关注我,马上关注你 界面 源码在图片下面…

【ONE·Linux || 高级IO(一)】

总言 主要内容:介绍五种IO模型的基本概念、学习IO多路转接(select、poll编程模型)。       文章目录 总言1、问题引入1.1、网络通信与IO1.2、五种IO模型1.2.1、举例引入1.2.2、IO模型具体含义介绍1.2.2.1、阻塞式IO1.2.2.2、非阻塞轮询检…