乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 10|回复: 0

[求助]请高手帮忙!!关于ObjectARX对MDT6.0的二次开发!

[复制链接]

6

主题

7

帖子

3

银币

初来乍到

Rank: 1

铜币
31
发表于 2004-3-12 10:48:00 | 显示全部楼层 |阅读模式
这一大堆程序是什么意思啊,有什么用呀,请高手指教,本人为了毕业设计,才认识ObjectARX,所以不了解,也是最近才开始学的!
#include "StdAfx.h"
#include "StdArx.h"
#include "resource.h"
HINSTANCE _hdllInstance =NULL ;
// This command registers an ARX command.
void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,
                                const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal = -1);
// NOTE: DO NOT edit the following lines.
//{{AFX_ARX_MSG
void InitApplication();
void UnloadApplication();
//}}AFX_ARX_MSG
// NOTE: DO NOT edit the following lines.
//{{AFX_ARX_ADDIN_FUNCS
//}}AFX_ARX_ADDIN_FUNCS
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
        if (dwReason == DLL_PROCESS_ATTACH)
        {
                                                         _hdllInstance = hInstance;
        } else if (dwReason == DLL_PROCESS_DETACH) {
        }
        return TRUE;                         // ok
}/////////////////////////////////////////////////////////////////////////////
// ObjectARX EntryPoint
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
        switch (msg) {
        case AcRx::kInitAppMsg:
                // Comment out the following line if your
                // application should be locked into memory
                acrxDynamicLinker->unlockApplication(pkt);
                acrxDynamicLinker->registerAppMDIAware(pkt);
                InitApplication();
                break;
        case AcRx::kUnloadAppMsg:
                UnloadApplication();
                break;
        }
        return AcRx::kRetOK;
}
// Init this application. Register your
// commands, reactors...
void InitApplication()
{
        // NOTE: DO NOT edit the following lines.
        //{{AFX_ARX_INIT
        AddCommand("JACKILIN", "TEST", "TEST", ACRX_CMD_TRANSPARENT | ACRX_CMD_USEPICKSET, Jackilintest);
        //}}AFX_ARX_INIT
        // TODO: add your initialization functions
}
// Unload this application. Unregister all objects
// registered in InitApplication.
void UnloadApplication()
{
        // NOTE: DO NOT edit the following lines.
        //{{AFX_ARX_EXIT
        acedRegCmds->removeGroup("JACKILIN");
        //}}AFX_ARX_EXIT
        // TODO: clean up your application
}
// This functions registers an ARX command.
// It can be used to read the localized command name
// from a string table stored in the resources.
void AddCommand(const char* cmdGroup, const char* cmdInt, const char* cmdLoc,
                                const int cmdFlags, const AcRxFunctionPtr cmdProc, const int idLocal)
{
        char cmdLocRes[65];
        // If idLocal is not -1, it's treated as an ID for
        // a string stored in the resources.
        if (idLocal != -1) {
                // Load strings from the string table and register the command.
                :oadString(_hdllInstance, idLocal, cmdLocRes, 64);
                acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLocRes, cmdFlags, cmdProc);
        } else
                // idLocal is -1, so the 'hard coded'
                // localized function name is used.
                acedRegCmds->addCommand(cmdGroup, cmdInt, cmdLoc, cmdFlags, cmdProc);
}
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-2-4 17:50 , Processed in 0.213613 second(s), 54 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表