// t81.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <acutads.h>
#include <tchar.h>
#include <aced.h>
#include <rxregsvc.h>
void initApp();
void unloadApp();
void helloWorld();
void initApp()
{
// register a command with the AutoCAD command mechanism
acedRegCmds->addCommand("HELLOWORLD_COMMANDS",
"Hello",
"Bonjour",
ACRX_CMD_MODAL,
helloWorld);
//acutPrintf(_T("%s%s", "Inside InitApp - ", "Registering commands with acedRegCmds\n"));
//acutPrintf("Enter \"HELLO\" at the command prompt to execute.\n");
}
void unloadApp()
{
acedRegCmds->removeGroup _T(("HELLOWORLD_COMMANDS"));
//acutPrintf("%s%s", "Goodbye\n", "Removing command group \"HELLO_COMMANDS\"\n");
}
void helloWorld()
{
acutPrintf(_T("\nHello World!"));
}
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode _T(msg), void* pkt)
//acrxEntryPoint("r4", void* pkt)
{
switch (msg)
{
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxRegisterAppMDIAware(pkt);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
break;
case AcRx::kLoadDwgMsg:
//acutPrintf("Received Acrx::kLoadDwgMsg\n");
break;
default:
break;
}
return AcRx::kRetOK;
}
------------------
MfG
Frank
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP