// gcd.cpp : Initialization functions
#include "StdAfx.h"
#include "StdArx.h"
#include "resource.h"
#include <afxdllx.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
////////////////////////////////////////////////////////////////////////////
//
// Define the sole extension module object.
AC_IMPLEMENT_EXTENSION_MODULE(GcdDLL);
// Now you can use the CAcModuleResourceOverride class in
// your application to switch to the correct resource instance.
// Please see the ObjectARX Documentation for more details
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_hdllInstance = hInstance;
// Extension DLL one time initialization
GcdDLL.AttachInstance(hInstance);
InitAcUiDLL();
} else if (dwReason == DLL_PROCESS_DETACH) {
// Terminate the library before destructors are called
GcdDLL.DetachInstance();
}
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("WF", "GCD", "GCD", ACRX_CMD_TRANSPARENT, wfgcd);
//}}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("WF");
//}}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.
::LoadString(_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);
}
没有合适的资源?快使用搜索试试~ 我知道了~
GCD.rar_AppRetCode_adui.h_autocad
共37个文件
h:9个
cpp:5个
obj:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 192 浏览量
2022-09-21
07:27:17
上传
评论
收藏 66KB RAR 举报
温馨提示
用VC++ 开发AutoCAD的一个简单的示例代码
资源推荐
资源详情
资源评论
收起资源包目录
GCD.rar (37个子文件)
GCD
rxdebug.h 611B
gcd___Win32_FullDebug
aduiRegistryAccess.h 5KB
DocData.h 863B
Resource.h 426B
FullDebug
Release
StdAfx.obj 1KB
gcd.obj 8KB
DocData.obj 18KB
vc60.idb 81KB
wfgcd.lib 2KB
gcdCommands.obj 12KB
rxdebug.obj 1KB
wfgcd.exp 746B
wfgcd.arx 28KB
gcd.res 828B
gcd.plg 4KB
DocData.cpp 706B
res
gcd.rc2 395B
AdskDMgr.h 3KB
ial.api 72B
gcd.clw 2KB
gcd.opt 48KB
gcd.ncb 89KB
rxdebug.cpp 979B
gcdCommands.cpp 3KB
gcd.dsp 7KB
cmd.api 107B
gcd.dsw 531B
gcd.aps 17KB
gcd.rc 2KB
gcd.cpp 3KB
StdAfx.cpp 206B
gcd.def 91B
StdAfx.h 3KB
ObjectARX.prj 23B
aduiMessage.h 11KB
adui.h 5KB
StdArx.h 813B
共 37 条
- 1
资源评论
我虽横行却不霸道
- 粉丝: 75
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功