AcRx::AppMsgCode一共有19种消息。

但由IMPLEMENT_ARX_ENTRYPOINT宏实现的App类,只处理了16种消息。

缺:

kSuspendMsg = 16,
    kInitTabGroupMsg = 17,
    kEndTabGroupMsg = 18

Messages that are sent to all applications

Messages that are sent only if the application has registered an AutoLISP ® function with acedDefun()

Messages that are sent to applications that have registered a service with ObjectARX

Messages only responded to by applications that use ActiveX Automation

  enum AppMsgCode {
kNullMsg = ,
kInitAppMsg = 1,
kUnloadAppMsg = 2,
kLoadDwgMsg = 3,
kUnloadDwgMsg = 4,
kInvkSubrMsg = 5,
kCfgMsg = 6,
kEndMsg = 7,
kQuitMsg = 8,
kSaveMsg = 9,
kDependencyMsg = 10,
kNoDependencyMsg = 11,
kOleUnloadAppMsg = 12,
kPreQuitMsg = 13,
kInitDialogMsg = ,
kEndDialogMsg = ,
kSuspendMsg = ,
kInitTabGroupMsg = ,
kEndTabGroupMsg =
};

这个kPreQuitMsg看起来像有用的。

官方建议在消息响应中做的操作

Message

Recommended Actions

kInitAppMsg

Do register services, classes, AcEd commands and reactors, and AcRxDynamicLinker reactors. Initialize application's system resources, such as devices and windows. Perform all one-time early initialization. AcRx, AcEd, and AcGe are all active. Store the value of the pkt parameter if you want to unlock and relock your application.

Don't expect device drivers to be initialized, any user interface resources to be active, applications to be loaded in a particular order, AutoLISP to be present, or any databases to be open. Calls involving any of these assumptions will result in an error condition, sometimes fatal. AcDb and AcGi libraries are generally not yet active, although related AcRx and other structures are in place.

kUnloadAppMsg

Do perform final system resource cleanup. Anything started or created in kInitAppMsg should now be stopped or destroyed.

Don't expect things to be any different from the description of kInitAppMsg. AutoCAD could be mostly dismantled by the time this call is made, except for the libraries listed as active in the kInitAppMsg Do description.

kOleUnloadAppMsg

This message should be responded to only by applications using ActiveX Automation.

Do respond with AcRx::kRetOK, if the application can be unloaded (none of its ActiveX objects or interfaces are being referenced by other applications). If it cannot be unloaded, respond with AcRx::kRetError.

kLoadDwgMsg

Do perform initialization relevant to the current drawing edit session. AcDb, AcGi, and the user interface API are all now active. Whether anything has been done to the drawing is not specified. All AutoCAD-supplied APIs are now active. You can perform AutoLISP function registration at this time, and initialize the user interface. Other operations to perform now include polling AutoCAD drivers and querying AcEditorReactor events if you want the earliest possible access to

acdbHostApplicationServices()->workingDatabase().

Don't do anything you would not want to happen for every drawing edit session. Assume this message is sent more than once per program execution.

kUnloadDwgMsg

Do release or clean up everything started or registered in response to kLoadDwgMsg code. Release all AcDb reactors, excluding persistent reactors.

Don't release system resources that are not tied to an edit session, or clean up AcRx classes, AcEd reactors, or commands; they remain valid across edit sessions.

kDependencyMsg

Do perform any actions that are necessary for your application when other applications become dependent on it, such as locking your application so that it cannot be unloaded.

kNoDependencyMsg

Do perform any actions that are necessary for your application when there are no longer any other applications dependent on yours, such as unlocking your application so that it can be unloaded by the user if desired.

kInvkSubrMsg

Do invoke the functions registered with acedDefun(). Determine the function by making a call to acedGetFuncode(). Return values with acedRetxxx().

Don't do much here except function invocation.

kPreQuitMsg

Do unload any dependencies (applications, DLLs, and so on) that your application controls to ensure that they are unloaded before your application.

kEndMsg

kCfgMsg

kQuitMsg

kSaveMsg

Do consider using the AcEditorReactor event callbacks as an alternative to responding to these messages.

Don't respond to these messages if you're responding to the equivalent event callbacks made through AcEditorReactor.

入口点函数的19种消息,AcRxArxApp只处理16种。的更多相关文章

  1. 做推送,怎么能不了解推送的 4 种消息形式呢?( Android 篇)

    极光推送是为 App 提供第三方推送服务的平台之一,它提供四种消息形式:通知,自定义消息,富媒体和本地通知. 笔者将基于官方说明与个人理解来谈一下这四种消息.本篇为 Android 篇,iOS 篇入口 ...

  2. 做推送,怎么能不了解推送的 4 种消息形式呢?(iOS 篇)

    极光推送是为 App 提供第三方推送服务的平台之一,它提供四种消息形式:通知,自定义消息,富媒体和本地通知.笔者将基于官方说明与个人理解来谈一下这四种消息.本篇为 iOS 篇,Android 篇入口. ...

  3. MySQL 笔记整理(19) --为什么我只查一行的语句,也执行这么慢?

    笔记记录自林晓斌(丁奇)老师的<MySQL实战45讲> (本篇内图片均来自丁奇老师的讲解,如有侵权,请联系我删除) 19) --为什么我只查一行的语句,也执行这么慢? 需要说明一下,如果M ...

  4. 学习ActiveMQ(五):activemq的五种消息类型和三种监听器类型

    一.前面我们一直发送的是字符串类型,其实activemq一共支持五种消息类型: 1.String消息类型:发送者:消费者: 1.String消息类型:发送者:消费者: 1.String消息类型:发送者 ...

  5. RabbitMQ之五种消息模型

    首先什么是MQ MQ全称是Message Queue,即消息对列!消息队列是典型的:生产者.消费者模型.生产者不断向消息队列中生产消息,消费者不断的从队列中获取消息.因为消息的生产和消费都是异步的,而 ...

  6. rabbitmq五种消息模型整理

    目录 0. 配置项目 1. 基本消息模型 1.1 生产者发送消息 1.2 消费者获取消息(自动ACK) 1.3 消息确认机制(ACK) 1.4 消费者获取消息(手动ACK) 1.5 自动ACK存在的问 ...

  7. JS_Window-三种消息框:警告框、确认框、提示框、页面显示时间-计时-延时

    1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="U ...

  8. C++:一般情况下,设计函数的形参只需要两种形式

    C++:一般情况下,设计函数的形参只需要两种形式.一,是引用形参,例如 void function (int &p_para):二,是常量引用形参,例如 void function(const ...

  9. 在 Perl看来, 字符串只有两种形式. 一种是octets, 即8位序列, 也就是我们通常说的字节数组. 另一种utf8编码的字符串, perl管它叫string. 也就是说: Perl只熟悉两种编

    在 Perl看来, 字符串只有两种形式. 一种是octets, 即8位序列, 也就是我们通常说的字节数组. 另一种utf8编码的字符串, perl管它叫string. 也就是说: Perl只熟悉两种编 ...

随机推荐

  1. [转载]【基础篇】不为人知的Maya移动坐标轴

    maya 设置轴向1.将整体模型方向调整到与世界坐标系一致.设置具体模型的轴朝向. 操作:选中模型,按住W键,鼠标左键,在弹出的菜单中选择Axis,比较常用的有Set To Ponit.Set To ...

  2. gitgub利用客户端实现简单的上传和同步

    新建项目 打开客户端(将项目拷贝到本地) 选择要clone到的文件夹 想该文件夹中,导入自己需要上传的代码 然后,在网站上登录自己的gitgub,就可以看到刚才上传的项目了╮(╯▽╰)╭

  3. Linux下I/O模型

    Unix下共有五种I/O模型 1. 阻塞式I/O 2. 非阻塞式I/O 3. I/O复用(select和poll) 4. 信号驱动式I/O(SIGIO) 5. 异步I/O(POSIX的aio_系列函数 ...

  4. 高版本正方教务系统上传后缀过滤不严导致能直接上传Webshell

    在旧版本中有一个利用插件上传文件的漏洞,但是在新版本中已经没有了这个插件.这个漏洞是由于过滤不严造成的,可以直接上传Webshell进行提权,由于代码在DLL中,全国大部分高校均有此漏洞,影响范围很大 ...

  5. 读javascript高级程序设计15-Ajax,CORS,JSONP,Img Ping

    平时用惯了jQuery.ajax之类的方法,却时常忽略了它背后的实现,本文是学习了AJAX基础及几种跨域解决方案之后的一些收获. 一.AJAX——XMLHttpRequest 谈起Ajax我们都很熟悉 ...

  6. JS转换时间戳为“刚刚”、“1分钟前”、“2小时前”“1天前”等格式

    var minute = 1000 * 60; var hour = minute *60; var day = hour *24; var week = day * 7; var month = d ...

  7. node

    docker run -d --name data -v c:/jayruanwork/app:/usr/share/app busybox || windows c:\jayruanwork\app ...

  8. buaaoj230——next_permutation的应用

    题目地址 简单的全排列输出,借用stl中的next_permutation就非常简单了. 关于next_permutation:(备忘,来源网络) /*这是一个求一个排序的下一个排列的函数,可以遍历全 ...

  9. [HB2014 Week5] Allot 人员分配

    这两天决心专门搞好网络流了 - - 题解在什么瞎胡搞跟我说要连n+2和n+1容量为无穷的边…我看了下std才做的… 坑死人的地方就是,需要求多次网络流,每次别忘了把流给清空了…这次是用链表所以专门写了 ...

  10. Autofac.Configuration 3.3.0不稳定

    Autofac.Configuration程序集的作用:通过配置来实现依赖注入. 示例: 1.配置内容 <configuration>  <configSections>    ...