首页 > 其他分享 >CAD二开-反应器Demo

CAD二开-反应器Demo

时间:2022-12-15 12:12:25浏览次数:40  
标签:CAppRonglianApp 二开 AppRLReactor Demo AppBaseReactor 反应器 include CAD

CAD 反应器

  1. 定义AppRLReactor类,继承AppBaseReactor

以下是测试代码

#pragma once
#include "AppBaseReactor.h"
class AppRLReactor : public AppBaseReactor
{
public:
	AppRLReactor();
	~AppRLReactor();
	DECLARE_MEMBERS(AppRLReactor); // 别忘记写

public:
	void appAfterStart();
};
#include "pch.h"
#include "AppRLReactor.h"

DEFINE_MEMBERS_INSATNCE(AppRLReactor, AppBaseReactor); // 别忘记写

AppRLReactor::AppRLReactor()
{
}

AppRLReactor::~AppRLReactor()
{
}

void AppRLReactor::appAfterStart()
{
	AfxMessageBox("软件启动成功");
}

添加初始化

// CAppRonglianApp 构造

CAppRonglianApp::CAppRonglianApp()
{
	// TODO:  在此处添加构造代码,
	// 将所有重要的初始化放置在 InitInstance 中

	AppRonglianMain::init();
	AppRLReactor::rxInit(); // 初始化反应器
}

上述代码只是添加测试代码,反应器的钩子多种多样,详情可以查看AppBaseReactor

标签:CAppRonglianApp,二开,AppRLReactor,Demo,AppBaseReactor,反应器,include,CAD
From: https://www.cnblogs.com/SpringBreath/p/16984650.html

相关文章