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


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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

2024年比较火的桌面便利贴,适合懒人的电脑便签

在2024年的数字化生活中,高效的电脑便签软件成为了许多“懒人”提升生产力的秘密武器。这些软件不仅让信息记录变得轻松快捷,还能帮助用户有效管理时间,减少遗忘,让桌面保持整洁有序。 其中,“好用便签”以简洁的设计…

新闻发稿:8个新闻媒体推广中最常见的错误-华媒舍

在数字时代,新闻媒体的推广手段已经越来越多样化。许多媒体在推广过程中常常会犯下一些常见错误。本文将会介绍八个新闻媒体在推广中最常见的错误,并希望能够帮助各位更好地规避这些问题。 1. 缺乏明确的目标受众 在进行推广前,新闻媒体需要…

【一百】【算法分析与设计】N皇后问题常规解法+位运算解法

N皇后问题 链接:登录—专业IT笔试面试备考平台_牛客网 来源:牛客网 题目描述 给出一个nnn\times nnn的国际象棋棋盘,你需要在棋盘中摆放nnn个皇后,使得任意两个皇后之间不能互相攻击。具体来说,不能存在两个皇后位于同…

任务3.3 学生喂养三种宠物:猫、狗和鸟

本任务旨在通过Java面向对象编程中的多态性和方法重载概念,实现一个学生喂养三种不同宠物(猫、狗、鸟)的程序。 定义基类和派生类 创建一个Animal基类,包含所有动物共有的属性和方法,如name、age、speak()、move()和ea…

项目-双人五子棋对战: websocket的讲解与使用 (1)

项目介绍 接下来, 我们将制作一个关于双人五子棋的项目, 话不多说先来理清一下需求. 1.用户模块 用户的注册和登录 管理用户的天梯分数, 比赛场数, 获胜场数等信息. 2.匹配模块 依据用户的天梯积分, 实现匹配机制. 3.对战模块 把两个匹配到的玩家放到同一个游戏房间中, 双方通…

基于大数据爬虫技术的图书推荐系统与可视化平台设计和实现(源码+LW+调试文档+讲解等)

💗博主介绍:✌全网粉丝1W,CSDN作者、博客专家、全栈领域优质创作者,博客之星、平台优质作者、专注于Java、小程序技术领域和毕业项目实战✌💗 🌟文末获取源码数据库🌟 感兴趣的可以先收藏起来,还…

MySQL数据库语法(二)

一、数据库的创建 创建数据库CRATE DATABASE语法&#xff1a;CREATE DATABASE [IF NOT EXISTS]数据库名;功能&#xff1a;用给定的名字创建一个数据库如果数据库已经存在&#xff0c;发生一个错误。查看创建数据库&#xff1a;SHOW CREATE DATABASE <数据库名>&#xff…

好用的linux链接工具

工具下载链接&#xff1a; FinalShell SSH工具,服务器管理,远程桌面加速软件,支持Windows,macOS,Linux,版本4.3.10,更新日期2023.12.31 - FinalShell官网FinalShell是一体化的的服务器,网络管理软件,不仅是ssh客户端,还是功能强大的开发,运维工具,充分满足开发,运维需求.特色功…

SpringBoot——全局异常处理

目录 异常 项目总结 新建一个SpringBoot项目 pom.xml Result&#xff08;通用的响应结果类&#xff09; MyBusinessException自定义异常类 GlobalExceptionHandler全局异常处理类 ExceptionController控制器 SpringbootExceptionApplication启动类 参考文章&#xff1a…

Facebook开户|Facebook公共主页疑难杂症详解

​​要要切克闹&#xff0c;公共主页我来道...哈喽呀家人们中午好&#xff0c;上一次学习还是在上一次..hhh相信很多家人在做Facebook的时候总会遇到各种各样匪夷所思的bug&#xff01;经常被搞心态吧&#xff01;那么咱们今天呢就来总结一下各类的bug以及解决方法&#xff0c;…

EPSON爱普生RTC RA8900CE/RA8000CE+松下Panasonic电池组合

RTC是一种实时时钟&#xff0c;用于记录和跟踪时间&#xff0c;具有独立供电和时钟功能。在某些应用场景中&#xff0c;为了保证RTC在断电或者其他异常情况下依然能够正常工作&#xff0c;需要备份电池方案来提供稳定的供电。本文将介绍EPSON爱普生RTC RA8900CE/RA8000CE松下Pa…

王春城 | 如何解决精益转型过程中的信任问题?

实践证明&#xff0c;精益转型不仅仅是技术和管理方法的更新&#xff0c;更是一场深刻的文化变革。在这个过程中&#xff0c;涉及到多个部门、多个层级的协同合作&#xff0c;需要团队成员之间的深度沟通和高度信任。如果缺乏信任&#xff0c;团队成员之间就会产生隔阂和抵触情…

手写数据集minist基于pytorch分类学习

1.Mnist数据集介绍 1.1 基本介绍 Mnist数据集可以算是学习深度学习最常用到的了。这个数据集包含70000张手写数字图片&#xff0c;分别是60000张训练图片和10000张测试图片&#xff0c;训练集由来自250个不同人手写的数字构成&#xff0c;一般来自高中生&#xff0c;一半来自工…

linux中最基础使用的命令

小白学习记录&#xff1a; 前情提要&#xff1a;Linux命令基础格式!查看 ls看目录的小技巧 进入指定目录 cd查看当前工作目录 pwd创建一个新的目录(文件夹&#xff09; mkdir创建文件 touch查看文件内容 cat、more操作文件、文件夹- 复制 cp- 移动 mv- 删除【危险操作&#xff…

OpenAI 近期动荡:解雇 Sam Altman 事件分析与 AI 未来展望

引言 OpenAI 的动荡从未停止。最近&#xff0c;由于 OpenAI 高层领导的更迭&#xff0c;引发了广泛的关注和讨论。特别是在 Sam Altman 被解雇后&#xff0c;再次回归 CEO 职位的过程&#xff0c;更是引起了公众和业内的巨大反响。前 OpenAI 董事会成员 Helen Toner 在最新一期…

Java1.8+ idea hbuilder+ uniapp、vue上门家政小程序APP源码开发

Java1.8 idea hbuilder uniapp、vue上门家政小程序APP源码开发 家政服务系统是一种专为家庭提供全方位服务的综合性系统。该系统通过整合多种服务功能和智能化管理&#xff0c;旨在提高家庭生活的质量和效率。 家政服务系统技术开发环境&#xff1a; 技术架构&#xff1a;spri…

心动(GDI+)

文章目录 前言实现步骤源代码心形坐标类心形函数定时器方法绘制函数完整源码 结束语 前言 近期学习了一段时间的GDI,突然想着用GDI绘制点啥&#xff0c;用来验证下类与方法。有兴趣的&#xff0c;可以查阅Windows GDI学习笔记相关文章。 效果展示 实现步骤 定义心形函数 。…

【微服务】部署mysql集群,主从复制,读写分离

两台服务器做如下操作 1.安装mysqldocker pull mysql:5.72.启动以及数据挂载 mkdir /root/mysql/data /root/mysql/log /root/mysql/conf touch my.conf //mysql的配置文件docker run --name mysql \ -e MYSQL_ROOT_PASSWORD123456 \ -v /root/mysql/data:/var/lib/mysql \ -v…

HarmonyOS鸿蒙学习笔记(28)@entry和@Component的生命周期

entry和Component的生命周期 entry和Component的关系Component生命周期Entry生命周期 生命周期流程图生命周期展示示例代码参考资料 HarmonyOS的生命周期可以分为Compnent的生命周期和Entry的生命周期&#xff0c;也就是自定义组件的生命周期和页面的生命周期。 entry和Compone…

RabbitMQ-发布/订阅模式

RabbitMQ-默认读、写方式介绍 RabbitMQ-直连交换机(direct)使用方法 目录 1、发布/订阅模式介绍 2、交换机(exchange) 3、fanout交换机的使用方式 3.1 声明交换机 3.2 发送消息到交换机 3.2 扇形交换机发送消息代码 3.2 声明队列&#xff0c;用于接收消息 3.3 binding …