在SDK中几乎每一个函数或类的单独介绍中都有一个叫做Include File的条目。这就是所需要包含的.h文件的名字,
比如你所要的acdbCurDwg宏那一页大约是这样写的:
This function is deprecated and has been replaced with the global curDwg. It is #defined in migrtion.h for transition purposes only. Include both dbapserv.h as well as migrtion.h in your application. The dbapserv.h header file is needed because it defines acdbHostApplicationServices().
Developers should call acdbHostApplicationServices()->workingDatabase() instead of acdbCurDwg() when they want to refer to the current database.
Note Anyone who uses acdbCurDwg() or acdbHostApplicationServices()->workingDatabase() will also need to link with acutil15.lib.
Include File
migrtion.h
最后标明了.h文件的名字,
另外,建议你使用ArxWizard,如果坚持不使用ArxWizard的话,也千万不要将各个.h文件都包含,这不是R16以后的写法,因为R16以后,SDK提供了arxHeaders.h头文件和dbxHeaders.h头文件,两个头文件包含了arx和dbx所需的所有.h文件,并令编译器连接所有所需的.lib文件,这使得你在进行版本移植的时候变得特别方便,旧版SDK的程序,一般不需要修改太多代码就可以使用新版的SDK。并且也就不会有头文件漏加的情况了 |