Create an Active Template Library Project

The first step is to create a new ATL project and modify its settings so that it is ObjectARX-compatible.

To create a new ObjectARX ATL project

  1. Create a new ATL project called AsdkDesignCenterSamp. Choose the DLL server type. Make sure that the Attributes checkbox is unchecked, and then choose Support MFC. MFC is not required, but it is used in this sample to make things easier. Click Finish.
  2. Add the necessary changes to make the project ObjectARX compatible. This includes adding the following entry code to the end of the AsdkDesignCenterSamp.cpp file:
extern "C" AcRx::AppRetCode 
acrxEntryPoint(AcRx::AppMsgCode msg, void* appId)
{
    switch(msg)
    {
    case AcRx::kInitAppMsg:
        acrxRegisterAppMDIAware(appId);
        break;
    case AcRx::kUnloadAppMsg:
        break;
    default:
        break;
    }
    return AcRx::kRetOK;
}

You will also need to add the appropriate settings to the project and export the following symbols in the definition (DEF) file:

acrxEntryPoint
acrxGetApiVersion