ObjectARX, AutoCAD. Среда программирования библиотеки C++


Формирование Иерархии Монопольных использований - часть 6


acedRegCmds->addCommand("ASDK_OWNERSHIP_COMMANDS",

"ASDK_LISTREE", "LISTREE",ACRX_CMD_MODAL, listTree);

AsdkOwnerDemo::rxInit();

acrxBuildClassHierarchy();

}

// The clean up function is called from acrxEntryPoint() during the

// kUnloadAppMsg case. This function removes this application’s

// command set from the command stack and the

// AsdkOwnerDemo class from the ARX runtime class tree.

//

void

unloadApp()

{

acedRegCmds->removeGroup("ASDK_OWNERSHIP_COMMANDS");

 

// Remove the AsdkOwnerDemo class from the ACRX runtime

// class hierarchy. If this is done while the database is

// still active, it should cause all objects of class

// AsdkOwnerDemo to be turned into proxies.

//

deleteAcRxClass(AsdkOwnerDemo::desc());

}

// ObjectARX entry point

//

AcRx::AppRetCode

acrxEntryPoint(AcRx::AppMsgCode msg, void* appId)

{

switch (msg) {

case AcRx::kInitAppMsg:

acrxDynamicLinker->unlockApplication(appId);

acrxDynamicLinker->registerAppMDIAware(appId);

initApp();

break;

case AcRx::kUnloadAppMsg:

unloadApp();

}

return AcRx::kRetOK;

}

 

 




Начало  Назад  Вперед