summaryrefslogtreecommitdiffstats
path: root/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/HelloWorld.cpp
blob: 90b1ea417e5cc6085d1a095419e71cc0895a03db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "stdafx.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(_T("HELLOWORLD_COMMANDS"),
                        _T("Hello"),
                        _T("GutenTag"),
                        ACRX_CMD_TRANSPARENT,
                        helloWorld);
}

void unloadApp()
{ 
acedRegCmds->removeGroup(_T("HELLOWORLD_COMMANDS"));
}

void helloWorld()
{ 
acutPrintf(_T("\nHello World!"));
}

extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
	switch (msg)
	{
		case AcRx::kInitAppMsg: acrxDynamicLinker->unlockApplication(pkt);
								acrxRegisterAppMDIAware(pkt);
								initApp();
								break;
		case AcRx::kUnloadAppMsg: unloadApp();
								  break;
		default: break;
	}
	return AcRx::kRetOK;
}